mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 06:44:04 +02:00
Merge pull request #92 from LEJOUI/master
Update SwitchDevice to SwitchEntity
This commit is contained in:
commit
ca8f25ad2e
3 changed files with 10 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ from homeassistant.util.dt import now as dt_now, get_time_zone
|
|||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
VERSION = '1.0.12b'
|
||||
VERSION = '1.0.13b'
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ from homeassistant.helpers.restore_state import RestoreEntity
|
|||
from homeassistant.components.light import (
|
||||
is_on, ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_RGB_COLOR, ATTR_TRANSITION,
|
||||
VALID_TRANSITION, ATTR_WHITE_VALUE, ATTR_XY_COLOR, DOMAIN as LIGHT_DOMAIN)
|
||||
from homeassistant.components.switch import SwitchDevice
|
||||
|
||||
try:
|
||||
from homeassistant.components.switch import SwitchEntity
|
||||
except ImportError:
|
||||
from homeassistant.components.switch import SwitchDevice as SwitchEntity
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID, CONF_NAME, CONF_PLATFORM, STATE_ON,
|
||||
SERVICE_TURN_ON)
|
||||
|
|
@ -105,7 +110,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
return False
|
||||
|
||||
|
||||
class CircadianSwitch(SwitchDevice, RestoreEntity):
|
||||
class CircadianSwitch(SwitchEntity, RestoreEntity):
|
||||
"""Representation of a Circadian Lighting switch."""
|
||||
|
||||
def __init__(self, hass, cl, name, lights_ct, lights_rgb, lights_xy, lights_brightness,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"circadian_lighting": {
|
||||
"updated_at": "2020-03-19",
|
||||
"version": "1.0.12b",
|
||||
"updated_at": "2020-06-03",
|
||||
"version": "1.0.13b",
|
||||
"local_location": "/custom_components/circadian_lighting/__init__.py",
|
||||
"remote_location": "https://raw.githubusercontent.com/claytonjn/hass-circadian_lighting/master/custom_components/circadian_lighting/__init__.py",
|
||||
"visit_repo": "https://github.com/claytonjn/hass-circadian_lighting",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue