Cleanup async handling (#6388)

* Cleanups unneeded blocks

* Cleanup bootstrap

* dedicated update_ha_state

* Fix imap_email_content

* fx tests

* Fix lint & spell
This commit is contained in:
Pascal Vizeli authored and Paulus Schoutsen committed 2017-03-04 15:10:36 -08:00
1 parent 3044aecbe9
commit 8232f1ef65
30 files changed
+124 -108

No files matched your search

+2 -2
View File
@@ -188,13 +188,13 @@ class BroadlinkRMSwitch(SwitchDevice):
"""Turn the device on."""
if self._sendpacket(self._command_on):
self._state = True
self.update_ha_state()
self.schedule_update_ha_state()
def turn_off(self, **kwargs):
"""Turn the device off."""
if self._sendpacket(self._command_off):
self._state = False
self.update_ha_state()
self.schedule_update_ha_state()
def _sendpacket(self, packet, retry=2):
"""Send packet to device."""