mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 18:54:08 +00:00
Allow erroring modules to recover (#1080)
Re-query failed modules after some delay instead of immediately disabling them. Changes to features so they can still be created when modules are erroring.
This commit is contained in:
@@ -340,7 +340,7 @@ class IotDevice(Device):
|
||||
name="RSSI",
|
||||
attribute_getter="rssi",
|
||||
icon="mdi:signal",
|
||||
unit="dBm",
|
||||
unit_getter=lambda: "dBm",
|
||||
category=Feature.Category.Debug,
|
||||
type=Feature.Type.Sensor,
|
||||
)
|
||||
|
@@ -28,7 +28,7 @@ class AmbientLight(IotModule):
|
||||
attribute_getter="ambientlight_brightness",
|
||||
type=Feature.Type.Sensor,
|
||||
category=Feature.Category.Primary,
|
||||
unit="%",
|
||||
unit_getter=lambda: "%",
|
||||
)
|
||||
)
|
||||
|
||||
|
@@ -41,8 +41,7 @@ class Light(IotModule, LightInterface):
|
||||
container=self,
|
||||
attribute_getter="brightness",
|
||||
attribute_setter="set_brightness",
|
||||
minimum_value=BRIGHTNESS_MIN,
|
||||
maximum_value=BRIGHTNESS_MAX,
|
||||
range_getter=lambda: (BRIGHTNESS_MIN, BRIGHTNESS_MAX),
|
||||
type=Feature.Type.Number,
|
||||
category=Feature.Category.Primary,
|
||||
)
|
||||
|
Reference in New Issue
Block a user