home_emulation/devices/livarno.py

15 lines
320 B
Python
Raw Normal View History

2023-10-29 15:10:52 +01:00
from devices.tradfri import sw as tradfri_sw
from devices.tradfri import sw_br_ct as tradfri_sw_br_ct
2023-08-03 20:43:41 +02:00
2023-10-29 15:10:52 +01:00
class sw(tradfri_sw):
pass
class sw_br_ct(tradfri_sw_br_ct):
2023-08-03 20:43:41 +02:00
def set_state(self, value):
self.__set__("state", "on" if value else "off")
def power_on_action(self):
2023-10-29 15:10:52 +01:00
self["state"] = "on"