Moved more methods out of HomeAssistant object
This commit is contained in:
1 parent
c08676aa81
commit
5835d502c7
13 files changed
+149
-111
No files matched your search
@@ -118,7 +118,7 @@ def turn_on(hass, entity_id=None, transition=None, brightness=None,
|
||||
if xy_color:
|
||||
data[ATTR_XY_COLOR] = xy_color
|
||||
|
||||
hass.call_service(DOMAIN, SERVICE_TURN_ON, data)
|
||||
hass.services.call(DOMAIN, SERVICE_TURN_ON, data)
|
||||
|
||||
|
||||
def turn_off(hass, entity_id=None, transition=None):
|
||||
@@ -131,7 +131,7 @@ def turn_off(hass, entity_id=None, transition=None):
|
||||
if transition is not None:
|
||||
data[ATTR_TRANSITION] = transition
|
||||
|
||||
hass.call_service(DOMAIN, SERVICE_TURN_OFF, data)
|
||||
hass.services.call(DOMAIN, SERVICE_TURN_OFF, data)
|
||||
|
||||
|
||||
# pylint: disable=too-many-branches, too-many-locals
|
||||
|
||||
Reference in new issue
Block a user