Set assumed_state property to True. (#24118)
This commit is contained in:
1 parent
fa20957e01
commit
ce219ac6c7
1 file changed
+5
@@ -79,6 +79,11 @@ class MCP23017Switch(ToggleEntity):
|
||||
"""Return true if device is on."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def assumed_state(self):
|
||||
"""Return true if optimistic updates are used."""
|
||||
return True
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the device on."""
|
||||
self._pin.value = not self._invert_logic
|
||||
|
||||
Reference in new issue
Block a user