home_emulation/devices/livarno.py

15 行
320 B
Python

from devices.tradfri import sw as tradfri_sw
from devices.tradfri import sw_br_ct as tradfri_sw_br_ct
class sw(tradfri_sw):
pass
class sw_br_ct(tradfri_sw_br_ct):
def set_state(self, value):
self.__set__("state", "on" if value else "off")
def power_on_action(self):
self["state"] = "on"