Style 0.34 (#4689)

* Minor style updates

* Minor style updates

* Update validation and logger messages

* Update ordering

* Fix lint issue

* Fix line too long

* Update ordering

* update logger messages
This commit is contained in:
Fabian Affolter authored and GitHub committed 2016-12-03 20:46:04 +01:00
1 parent 9a6c9cff30
commit dddf4d1460
6 files changed
+92 -101

No files matched your search

+11 -9
View File
@@ -9,6 +9,7 @@ import logging
import os
import voluptuous as vol
from homeassistant.config import load_yaml_config_file
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.entity import ToggleEntity
@@ -18,22 +19,25 @@ from homeassistant.const import (
from homeassistant.components import group
from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
ATTR_DEVICE = 'device'
ATTR_COMMAND = 'command'
_LOGGER = logging.getLogger(__name__)
ATTR_ACTIVITY = 'activity'
SERVICE_SEND_COMMAND = 'send_command'
SERVICE_SYNC = 'sync'
ATTR_COMMAND = 'command'
ATTR_DEVICE = 'device'
DOMAIN = 'remote'
SCAN_INTERVAL = 30
GROUP_NAME_ALL_REMOTES = 'all remotes'
ENTITY_ID_ALL_REMOTES = group.ENTITY_ID_FORMAT.format('all_remotes')
ENTITY_ID_FORMAT = DOMAIN + '.{}'
GROUP_NAME_ALL_REMOTES = 'all remotes'
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
SCAN_INTERVAL = 30
SERVICE_SEND_COMMAND = 'send_command'
SERVICE_SYNC = 'sync'
REMOTE_SERVICE_SCHEMA = vol.Schema({
vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
})
@@ -47,8 +51,6 @@ REMOTE_SERVICE_SEND_COMMAND_SCHEMA = REMOTE_SERVICE_SCHEMA.extend({
vol.Required(ATTR_COMMAND): cv.string,
})
_LOGGER = logging.getLogger(__name__)
def is_on(hass, entity_id=None):
"""Return if the remote is on based on the statemachine."""