diff --git a/devices/__init__.py b/devices/__init__.py index 741b8eb..e6efd87 100644 --- a/devices/__init__.py +++ b/devices/__init__.py @@ -372,8 +372,10 @@ class shelly(base): if self.flash_active: self.all_off_requested = True else: - self.set_output_0(False) - self.set_output_1(False) + if self.output_0: + self.set_output_0(False) + if self.output_1: + self.set_output_1(False) class silvercrest_powerplug(base): @@ -418,7 +420,8 @@ class silvercrest_powerplug(base): self.set_output_0('toggle') def all_off(self): - self.set_output_0(False) + if self.output_0: + self.set_output_0(False) class silvercrest_motion_sensor(base): @@ -661,7 +664,8 @@ class tradfri_light(base): self.set_color_temp(data) def all_off(self): - self.set_output_0(False) + if self.output_0: + self.set_output_0(False) class tradfri_button(base):