Merge pull request #1353 from balloob/assume-state

Add assumed_state to Group, MQTT Switch, MQTT Light
This commit is contained in:
Paulus Schoutsen committed 2016-02-21 09:19:54 -08:00
commit 070cee48a8
6 files changed
+160 -55

No files matched your search

+5
View File
@@ -97,6 +97,11 @@ class MqttSwitch(SwitchDevice):
""" 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. """
mqtt.publish(self.hass, self._command_topic, self._payload_on,