Remove service helper (3) (#16879)
* Update duckdns * Update google_assistant * Update group * Update homematic * Update image_processing * Update input_boolean * Update input_number * Update input_select * Update input_text
This commit is contained in:
parent
672fc61bb2
commit
e2a56721d3
22 changed files with 217 additions and 231 deletions
|
@ -46,24 +46,6 @@ def is_on(hass, entity_id):
|
|||
return hass.states.is_state(entity_id, STATE_ON)
|
||||
|
||||
|
||||
@bind_hass
|
||||
def turn_on(hass, entity_id):
|
||||
"""Set input_boolean to True."""
|
||||
hass.services.call(DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: entity_id})
|
||||
|
||||
|
||||
@bind_hass
|
||||
def turn_off(hass, entity_id):
|
||||
"""Set input_boolean to False."""
|
||||
hass.services.call(DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: entity_id})
|
||||
|
||||
|
||||
@bind_hass
|
||||
def toggle(hass, entity_id):
|
||||
"""Set input_boolean to False."""
|
||||
hass.services.call(DOMAIN, SERVICE_TOGGLE, {ATTR_ENTITY_ID: entity_id})
|
||||
|
||||
|
||||
async def async_setup(hass, config):
|
||||
"""Set up an input boolean."""
|
||||
component = EntityComponent(_LOGGER, DOMAIN, hass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue