Fix id zone mismatch (#7165)
* Fixes issue with id mismatch when multiple devices are connected to the lutron bridge * Updates labels * removes no longer needed config values. * removes no longer needed importspull/7172/head
parent
1e758ed030
commit
e4bbbe20dd
|
@ -42,7 +42,7 @@ class LutronCasetaLight(LutronCasetaDevice, Light):
|
|||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the light on."""
|
||||
if ATTR_BRIGHTNESS in kwargs and self._device_type == "WallDimmer":
|
||||
if ATTR_BRIGHTNESS in kwargs:
|
||||
brightness = kwargs[ATTR_BRIGHTNESS]
|
||||
else:
|
||||
brightness = 255
|
||||
|
|
|
@ -10,15 +10,13 @@ import logging
|
|||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import (CONF_HOST,
|
||||
CONF_USERNAME,
|
||||
CONF_PASSWORD)
|
||||
from homeassistant.const import CONF_HOST
|
||||
from homeassistant.helpers import discovery
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
REQUIREMENTS = ['https://github.com/gurumitts/'
|
||||
'pylutron-caseta/archive/v0.2.5.zip#'
|
||||
'pylutron-caseta==v0.2.5']
|
||||
'pylutron-caseta/archive/v0.2.6.zip#'
|
||||
'pylutron-caseta==v0.2.6']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -28,9 +26,7 @@ DOMAIN = 'lutron_caseta'
|
|||
|
||||
CONFIG_SCHEMA = vol.Schema({
|
||||
DOMAIN: vol.Schema({
|
||||
vol.Required(CONF_HOST): cv.string,
|
||||
vol.Required(CONF_USERNAME): cv.string,
|
||||
vol.Required(CONF_PASSWORD): cv.string
|
||||
vol.Required(CONF_HOST): cv.string
|
||||
})
|
||||
}, extra=vol.ALLOW_EXTRA)
|
||||
|
||||
|
@ -41,9 +37,7 @@ def setup(hass, base_config):
|
|||
|
||||
config = base_config.get(DOMAIN)
|
||||
hass.data[LUTRON_CASETA_SMARTBRIDGE] = Smartbridge(
|
||||
hostname=config[CONF_HOST],
|
||||
username=config[CONF_USERNAME],
|
||||
password=config[CONF_PASSWORD]
|
||||
hostname=config[CONF_HOST]
|
||||
)
|
||||
if not hass.data[LUTRON_CASETA_SMARTBRIDGE].is_connected():
|
||||
_LOGGER.error("Unable to connect to Lutron smartbridge at %s",
|
||||
|
@ -71,6 +65,7 @@ class LutronCasetaDevice(Entity):
|
|||
self._device_id = device["device_id"]
|
||||
self._device_type = device["type"]
|
||||
self._device_name = device["name"]
|
||||
self._device_zone = device["zone"]
|
||||
self._state = None
|
||||
self._smartbridge = bridge
|
||||
|
||||
|
@ -93,7 +88,8 @@ class LutronCasetaDevice(Entity):
|
|||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes."""
|
||||
attr = {'Lutron Integration ID': self._device_id}
|
||||
attr = {'Device ID': self._device_id,
|
||||
'Zone ID': self._device_zone}
|
||||
return attr
|
||||
|
||||
@property
|
||||
|
|
|
@ -266,7 +266,7 @@ https://github.com/bah2830/python-roku/archive/3.1.3.zip#roku==3.1.3
|
|||
https://github.com/bashwork/pymodbus/archive/d7fc4f1cc975631e0a9011390e8017f64b612661.zip#pymodbus==1.2.0
|
||||
|
||||
# homeassistant.components.lutron_caseta
|
||||
https://github.com/gurumitts/pylutron-caseta/archive/v0.2.5.zip#pylutron-caseta==v0.2.5
|
||||
https://github.com/gurumitts/pylutron-caseta/archive/v0.2.6.zip#pylutron-caseta==v0.2.6
|
||||
|
||||
# homeassistant.components.netatmo
|
||||
https://github.com/jabesq/netatmo-api-python/archive/v0.9.1.zip#lnetatmo==0.9.1
|
||||
|
|
Loading…
Reference in New Issue