1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Update file header (#21054)

* Update file header

* Update __init__.py
This commit is contained in:
Fabian Affolter
2019-02-14 05:35:12 +01:00
committed by Paulus Schoutsen
parent 3a386e627e
commit 161c368c9d
165 changed files with 482 additions and 1346 deletions

View File

@@ -1,10 +1,4 @@
"""
Contains functionality to use a X10 dimmer over Mochad.
For more details about this platform, please refer to the documentation at
https://home.assistant.io/components/light.mochad/
"""
"""Support for X10 dimmer over Mochad."""
import logging
import voluptuous as vol
@@ -16,11 +10,11 @@ from homeassistant.const import (
CONF_NAME, CONF_PLATFORM, CONF_DEVICES, CONF_ADDRESS)
from homeassistant.helpers import config_validation as cv
DEPENDENCIES = ['mochad']
_LOGGER = logging.getLogger(__name__)
CONF_BRIGHTNESS_LEVELS = 'brightness_levels'
DEPENDENCIES = ['mochad']
CONF_BRIGHTNESS_LEVELS = 'brightness_levels'
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_PLATFORM): mochad.DOMAIN,
@@ -51,11 +45,11 @@ class MochadLight(Light):
self._controller = ctrl
self._address = dev[CONF_ADDRESS]
self._name = dev.get(CONF_NAME,
'x10_light_dev_{}'.format(self._address))
self._name = dev.get(
CONF_NAME, 'x10_light_dev_{}'.format(self._address))
self._comm_type = dev.get(mochad.CONF_COMM_TYPE, 'pl')
self.light = device.Device(ctrl, self._address,
comm_type=self._comm_type)
self.light = device.Device(
ctrl, self._address, comm_type=self._comm_type)
self._brightness = 0
self._state = self._get_device_status()
self._brightness_levels = dev.get(CONF_BRIGHTNESS_LEVELS) - 1