1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

MQTT Light to expose assumed_state if optimistic

This commit is contained in:
Paulus Schoutsen
2016-02-20 17:17:22 -08:00
parent 6532eae3d5
commit 8f70630790
2 changed files with 8 additions and 1 deletions

View File

@@ -134,6 +134,11 @@ class MqttLight(Light):
""" True if device is on. """
return self._state
@property
def assumed_state(self):
"""Return True if we do optimistic updates."""
return self._optimistic
def turn_on(self, **kwargs):
""" Turn the device on. """
should_update = False