Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix id zone mismatch #7165

Merged
merged 4 commits into from Apr 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/light/lutron_caseta.py
Expand Up @@ -42,7 +42,7 @@ def brightness(self):

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
Expand Down
20 changes: 8 additions & 12 deletions homeassistant/components/lutron_caseta.py
Expand Up @@ -10,15 +10,13 @@
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__)

Expand All @@ -28,9 +26,7 @@

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)

Expand All @@ -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",
Expand Down Expand Up @@ -71,6 +65,7 @@ def __init__(self, device, bridge):
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

Expand All @@ -93,7 +88,8 @@ def name(self):
@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
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Expand Up @@ -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
Expand Down