From ce219ac6c7ada8b0a80c06e920801cb7d42fe29c Mon Sep 17 00:00:00 2001 From: Jardi Martinez <1088732+jardiamj@users.noreply.github.com> Date: Sun, 26 May 2019 03:26:51 -0700 Subject: [PATCH] Set assumed_state property to True. (#24118) --- homeassistant/components/mcp23017/switch.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/mcp23017/switch.py b/homeassistant/components/mcp23017/switch.py index caa183543ac..8638b793a65 100644 --- a/homeassistant/components/mcp23017/switch.py +++ b/homeassistant/components/mcp23017/switch.py @@ -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