diff --git a/docs/tutorial.py b/docs/tutorial.py index 5dc768c7..7bb3381a 100644 --- a/docs/tutorial.py +++ b/docs/tutorial.py @@ -91,5 +91,5 @@ False True >>> for feat in dev.features.values(): >>> print(f"{feat.name}: {feat.value}") -Device ID: 0000000000000000000000000000000000000000\nState: True\nSignal Level: 2\nRSSI: -52\nSSID: #MASKED_SSID#\nOverheated: False\nBrightness: 50\nCloud connection: True\nHSV: HSV(hue=0, saturation=100, value=50)\nColor temperature: 2700\nAuto update enabled: True\nUpdate available: False\nCurrent firmware version: 1.1.6 Build 240130 Rel.173828\nAvailable firmware version: 1.1.6 Build 240130 Rel.173828\nLight effect: Party\nLight preset: Light preset 1\nSmooth transition on: 2\nSmooth transition off: 2\nTime: 2024-02-23 02:40:15+01:00 +Device ID: 0000000000000000000000000000000000000000\nState: True\nSignal Level: 2\nRSSI: -52\nSSID: #MASKED_SSID#\nOverheated: False\nBrightness: 50\nCloud connection: True\nHSV: HSV(hue=0, saturation=100, value=50)\nColor temperature: 2700\nAuto update enabled: True\nUpdate available: False\nCurrent firmware version: 1.1.6 Build 240130 Rel.173828\nAvailable firmware version: 1.1.6 Build 240130 Rel.173828\nLight effect: Party\nLight preset: Light preset 1\nSmooth transition on: 2\nSmooth transition off: 2\nDevice time: 2024-02-23 02:40:15+01:00 """ diff --git a/kasa/feature.py b/kasa/feature.py index 38c6fca9..53532932 100644 --- a/kasa/feature.py +++ b/kasa/feature.py @@ -37,7 +37,7 @@ Light effect (light_effect): Off Light preset (light_preset): Not set Smooth transition on (smooth_transition_on): 2 Smooth transition off (smooth_transition_off): 2 -Time (time): 2024-02-23 02:40:15+01:00 +Device time (device_time): 2024-02-23 02:40:15+01:00 To see whether a device supports a feature, check for the existence of it: diff --git a/kasa/iot/iotdevice.py b/kasa/iot/iotdevice.py index 4b8325a2..e181d7ca 100755 --- a/kasa/iot/iotdevice.py +++ b/kasa/iot/iotdevice.py @@ -352,6 +352,7 @@ class IotDevice(Device): name="On since", attribute_getter="on_since", icon="mdi:clock", + category=Feature.Category.Info, ) ) diff --git a/kasa/iot/iotstrip.py b/kasa/iot/iotstrip.py index c2f2bb86..eea9f32c 100755 --- a/kasa/iot/iotstrip.py +++ b/kasa/iot/iotstrip.py @@ -340,6 +340,7 @@ class IotStripPlug(IotPlug): name="On since", attribute_getter="on_since", icon="mdi:clock", + category=Feature.Category.Info, ) ) for module in self._supported_modules.values(): diff --git a/kasa/smart/modules/reportmode.py b/kasa/smart/modules/reportmode.py index f0af4c1c..70447662 100644 --- a/kasa/smart/modules/reportmode.py +++ b/kasa/smart/modules/reportmode.py @@ -26,6 +26,7 @@ class ReportMode(SmartModule): name="Report interval", container=self, attribute_getter="report_interval", + unit="s", category=Feature.Category.Debug, ) ) diff --git a/kasa/smart/modules/temperaturecontrol.py b/kasa/smart/modules/temperaturecontrol.py index ae487bdf..e582d77a 100644 --- a/kasa/smart/modules/temperaturecontrol.py +++ b/kasa/smart/modules/temperaturecontrol.py @@ -79,8 +79,8 @@ class TemperatureControl(SmartModule): self._add_feature( Feature( device, - id="mode", - name="Mode", + id="thermostat_mode", + name="Thermostat mode", container=self, attribute_getter="mode", category=Feature.Category.Primary, diff --git a/kasa/smart/modules/time.py b/kasa/smart/modules/time.py index 3c2b96af..c2007ceb 100644 --- a/kasa/smart/modules/time.py +++ b/kasa/smart/modules/time.py @@ -25,11 +25,11 @@ class Time(SmartModule): self._add_feature( Feature( device=device, - id="time", - name="Time", + id="device_time", + name="Device time", attribute_getter="time", container=self, - category=Feature.Category.Debug, + category=Feature.Category.Info, ) ) diff --git a/kasa/smart/smartdevice.py b/kasa/smart/smartdevice.py index bf3eb25e..ebe73b1c 100644 --- a/kasa/smart/smartdevice.py +++ b/kasa/smart/smartdevice.py @@ -277,6 +277,7 @@ class SmartDevice(Device): name="RSSI", attribute_getter=lambda x: x._info["rssi"], icon="mdi:signal", + unit="dBm", category=Feature.Category.Debug, ) ) @@ -316,7 +317,7 @@ class SmartDevice(Device): name="On since", attribute_getter="on_since", icon="mdi:clock", - category=Feature.Category.Info, + category=Feature.Category.Debug, ) )