mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-11-15 06:38:42 +00:00
Remove SmartPlug in favor of SmartDevice (#781)
With the move towards autodetecting available features, there is no reason to keep SmartPlug around. kasa.smart.SmartPlug is removed in favor of kasa.smart.SmartDevice which offers the same functionality. Information about auto_off can be accessed using Features of the AutoOffModule on supported devices. Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ from kasa import (
|
||||
)
|
||||
from kasa.discover import DiscoveryResult
|
||||
from kasa.iot import IotBulb, IotDevice, IotDimmer, IotLightStrip, IotPlug, IotStrip
|
||||
from kasa.smart import SmartBulb, SmartDevice, SmartPlug
|
||||
from kasa.smart import SmartBulb, SmartDevice
|
||||
|
||||
try:
|
||||
from pydantic.v1 import ValidationError
|
||||
@@ -72,7 +72,7 @@ TYPE_TO_CLASS = {
|
||||
"iot.dimmer": IotDimmer,
|
||||
"iot.strip": IotStrip,
|
||||
"iot.lightstrip": IotLightStrip,
|
||||
"smart.plug": SmartPlug,
|
||||
"smart.plug": SmartDevice,
|
||||
"smart.bulb": SmartBulb,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user