mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-08 22:07:06 +00:00
Fix TapoBulb state information for non-dimmable SMARTSWITCH (#726)
This commit is contained in:
parent
f8e273981c
commit
bc1503c40e
@ -243,9 +243,10 @@ class TapoBulb(TapoDevice, SmartBulb):
|
|||||||
info: Dict[str, Any] = {
|
info: Dict[str, Any] = {
|
||||||
# TODO: re-enable after we don't inherit from smartbulb
|
# TODO: re-enable after we don't inherit from smartbulb
|
||||||
# **super().state_information
|
# **super().state_information
|
||||||
"Brightness": self.brightness,
|
|
||||||
"Is dimmable": self.is_dimmable,
|
"Is dimmable": self.is_dimmable,
|
||||||
}
|
}
|
||||||
|
if self.is_dimmable:
|
||||||
|
info["Brightness"] = self.brightness
|
||||||
if self.is_variable_color_temp:
|
if self.is_variable_color_temp:
|
||||||
info["Color temperature"] = self.color_temp
|
info["Color temperature"] = self.color_temp
|
||||||
info["Valid temperature range"] = self.valid_temperature_range
|
info["Valid temperature range"] = self.valid_temperature_range
|
||||||
|
Loading…
Reference in New Issue
Block a user