Remove service helper (4) (#16892)
* Update media_player * Update lock * Update notify * Update remote * Update scene * Update vacuum * Remove timer helpers * Removed unused legacy helpers
This commit is contained in:
parent
d0ddc28f96
commit
dd45e99302
23 changed files with 499 additions and 520 deletions
|
@ -12,7 +12,6 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant.setup import async_prepare_setup_platform
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.loader import bind_hass
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import CONF_NAME, CONF_PLATFORM
|
||||
from homeassistant.helpers import config_per_platform, discovery
|
||||
|
@ -50,22 +49,6 @@ NOTIFY_SERVICE_SCHEMA = vol.Schema({
|
|||
})
|
||||
|
||||
|
||||
@bind_hass
|
||||
def send_message(hass, message, title=None, data=None):
|
||||
"""Send a notification message."""
|
||||
info = {
|
||||
ATTR_MESSAGE: message
|
||||
}
|
||||
|
||||
if title is not None:
|
||||
info[ATTR_TITLE] = title
|
||||
|
||||
if data is not None:
|
||||
info[ATTR_DATA] = data
|
||||
|
||||
hass.services.call(DOMAIN, SERVICE_NOTIFY, info)
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_setup(hass, config):
|
||||
"""Set up the notify services."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue