Moved more methods out of HomeAssistant object

This commit is contained in:
Paulus Schoutsen committed 2014-11-30 18:42:52 -08:00
1 parent c08676aa81
commit 5835d502c7
13 files changed
+149 -111

No files matched your search

+2 -2
View File
@@ -43,14 +43,14 @@ def turn_on(hass, entity_id=None):
""" Turns all or specified switch on. """
data = {ATTR_ENTITY_ID: entity_id} if entity_id else None
hass.call_service(DOMAIN, SERVICE_TURN_ON, data)
hass.services.call(DOMAIN, SERVICE_TURN_ON, data)
def turn_off(hass, entity_id=None):
""" Turns all or specified switch off. """
data = {ATTR_ENTITY_ID: entity_id} if entity_id else None
hass.call_service(DOMAIN, SERVICE_TURN_OFF, data)
hass.services.call(DOMAIN, SERVICE_TURN_OFF, data)
# pylint: disable=too-many-branches