remove setting of self._state in switch

This commit is contained in:
Stefan Lehmann
2017-11-16 20:42:44 +01:00
parent b0999f458b
commit f6024a3ae1

View File

@@ -56,13 +56,11 @@ class AdsSwitch(ToggleEntity):
"""Turn the switch on."""
self._ads_hub.write_by_name(self.ads_var, True,
self._ads_hub.PLCTYPE_BOOL)
self._on_state = True
def turn_off(self, **kwargs):
"""Turn the switch off."""
self._ads_hub.write_by_name(self.ads_var, False,
self._ads_hub.PLCTYPE_BOOL)
self._on_state = False
def value_changed(self, val):
"""Handle changed state."""