Clean-up, ordering, constants, and extend of schema (#2903)
* Clean-up, ordering, constants, and extend of schema * Put REQUIREMENTS back and re-add line breaks * Clean-up, ordering, constants, and extend of schema * Extend platform
This commit is contained in:
1 parent
8fc27cbe43
commit
e8c6e4d561
28 files changed
+232
-228
No files matched your search
@@ -12,22 +12,24 @@ from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.helpers.entity import Entity
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
CONF_CHANNELS = 'channels'
|
||||
STATE_STREAMING = 'streaming'
|
||||
STATE_OFFLINE = 'offline'
|
||||
REQUIREMENTS = ['python-twitch==1.3.0']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_GAME = 'game'
|
||||
ATTR_TITLE = 'title'
|
||||
|
||||
CONF_CHANNELS = 'channels'
|
||||
ICON = 'mdi:twitch'
|
||||
|
||||
REQUIREMENTS = ['python-twitch==1.3.0']
|
||||
STATE_OFFLINE = 'offline'
|
||||
STATE_STREAMING = 'streaming'
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
||||
vol.Required(CONF_CHANNELS, default=[]):
|
||||
vol.All(cv.ensure_list, [cv.string]),
|
||||
})
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
||||
Reference in new issue
Block a user