Remove service helper (8) (#17055)
* Updated keyboard * Updated microsoft_face * Updated ffmpeg * Updated logger * Updated components/__init__.py
This commit is contained in:
parent
13af61e103
commit
90f71261c5
9 changed files with 193 additions and 167 deletions
|
@ -54,27 +54,6 @@ SERVICE_FFMPEG_SCHEMA = vol.Schema({
|
|||
})
|
||||
|
||||
|
||||
@callback
|
||||
def async_start(hass, entity_id=None):
|
||||
"""Start a FFmpeg process on entity."""
|
||||
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
|
||||
hass.async_add_job(hass.services.async_call(DOMAIN, SERVICE_START, data))
|
||||
|
||||
|
||||
@callback
|
||||
def async_stop(hass, entity_id=None):
|
||||
"""Stop a FFmpeg process on entity."""
|
||||
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
|
||||
hass.async_add_job(hass.services.async_call(DOMAIN, SERVICE_STOP, data))
|
||||
|
||||
|
||||
@callback
|
||||
def async_restart(hass, entity_id=None):
|
||||
"""Restart a FFmpeg process on entity."""
|
||||
data = {ATTR_ENTITY_ID: entity_id} if entity_id else {}
|
||||
hass.async_add_job(hass.services.async_call(DOMAIN, SERVICE_RESTART, data))
|
||||
|
||||
|
||||
async def async_setup(hass, config):
|
||||
"""Set up the FFmpeg component."""
|
||||
conf = config.get(DOMAIN, {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue