Remove service helper (8) (#17055)

* Updated keyboard

* Updated microsoft_face

* Updated ffmpeg

* Updated logger

* Updated components/__init__.py
This commit is contained in:
cdce8p 2018-10-02 10:23:37 +02:00 committed by Paulus Schoutsen
parent 13af61e103
commit 90f71261c5
9 changed files with 193 additions and 167 deletions

View file

@ -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, {})