Skip to content

Commit

Permalink
Merge pull request home-assistant#4492 from home-assistant/release-0-…
Browse files Browse the repository at this point in the history
…33-1

0.33.1
  • Loading branch information
balloob authored Nov 20, 2016
2 parents 8b6a94b + 99f5db8 commit 11df7be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/light/zwave.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
node = zwave.NETWORK.nodes[discovery_info[zwave.const.ATTR_NODE_ID]]
value = node.values[discovery_info[zwave.const.ATTR_VALUE_ID]]
customize = hass.data['zwave_customize']
name = super().entity_id
name = '{}.{}'.format(DOMAIN, zwave.object_id(value))
node_config = customize.get(name, {})
refresh = node_config.get(zwave.CONF_REFRESH_VALUE)
delay = node_config.get(zwave.CONF_REFRESH_DELAY)
Expand Down
12 changes: 6 additions & 6 deletions homeassistant/components/zwave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,19 @@ def _node_object_id(node):
return node_object_id


def _object_id(value):
def object_id(value):
"""Return the object_id of the device value.
The object_id contains node_id and value instance id
to not collide with other entity_ids.
"""
object_id = "{}_{}_{}".format(slugify(_value_name(value)),
value.node.node_id, value.index)
_object_id = "{}_{}_{}".format(slugify(_value_name(value)),
value.node.node_id, value.index)

# Add the instance id if there is more than one instance for the value
if value.instance > 1:
return '{}_{}'.format(object_id, value.instance)
return object_id
return _object_id


def nice_print_node(node):
Expand Down Expand Up @@ -341,7 +341,7 @@ def value_added(node, value):
node.generic, node.specific,
value.command_class, value.type,
value.genre)
name = "{}.{}".format(component, _object_id(value))
name = "{}.{}".format(component, object_id(value))

node_config = customize.get(name, {})

Expand Down Expand Up @@ -594,7 +594,7 @@ def _object_id(self):
The object_id contains node_id and value instance id to not collide
with other entity_ids.
"""
return _object_id(self._value)
return object_id(self._value)

@property
def device_state_attributes(self):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 33
PATCH_VERSION = '0'
PATCH_VERSION = '1'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
REQUIRED_PYTHON_VER = (3, 4, 2)
Expand Down

0 comments on commit 11df7be

Please sign in to comment.