mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
remove setting of self._state in switch
This commit is contained in:
@@ -56,13 +56,11 @@ class AdsSwitch(ToggleEntity):
|
|||||||
"""Turn the switch on."""
|
"""Turn the switch on."""
|
||||||
self._ads_hub.write_by_name(self.ads_var, True,
|
self._ads_hub.write_by_name(self.ads_var, True,
|
||||||
self._ads_hub.PLCTYPE_BOOL)
|
self._ads_hub.PLCTYPE_BOOL)
|
||||||
self._on_state = True
|
|
||||||
|
|
||||||
def turn_off(self, **kwargs):
|
def turn_off(self, **kwargs):
|
||||||
"""Turn the switch off."""
|
"""Turn the switch off."""
|
||||||
self._ads_hub.write_by_name(self.ads_var, False,
|
self._ads_hub.write_by_name(self.ads_var, False,
|
||||||
self._ads_hub.PLCTYPE_BOOL)
|
self._ads_hub.PLCTYPE_BOOL)
|
||||||
self._on_state = False
|
|
||||||
|
|
||||||
def value_changed(self, val):
|
def value_changed(self, val):
|
||||||
"""Handle changed state."""
|
"""Handle changed state."""
|
||||||
|
Reference in New Issue
Block a user