Skip to content

Commit

Permalink
Merge pull request home-assistant#10069 from home-assistant/release-0…
Browse files Browse the repository at this point in the history
…-56-2

0.56.2
  • Loading branch information
pvizeli authored Oct 23, 2017
2 parents 106bf46 + 79d71c6 commit e620479
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
13 changes: 7 additions & 6 deletions homeassistant/components/automation/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ def async_trigger(hass, config, action):
event_type = config.get(CONF_EVENT_TYPE)
event_data_schema = vol.Schema(
config.get(CONF_EVENT_DATA),
extra=vol.ALLOW_EXTRA)
extra=vol.ALLOW_EXTRA) if config.get(CONF_EVENT_DATA) else None

@callback
def handle_event(event):
"""Listen for events and calls the action when data matches."""
try:
event_data_schema(event.data)
except vol.Invalid:
# If event data doesn't match requested schema, skip event
return
if event_data_schema:
try:
event_data_schema(event.data)
except vol.Invalid:
# If event data doesn't match requested schema, skip event
return

hass.async_run_job(action, {
'trigger': {
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/sensor/xiaomi_aqara.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ def parse_data(self, data):
return False
elif self._data_key == 'humidity' and (value <= 0 or value > 100):
return False
elif self._data_key == 'illumination' and value == 0:
return False
elif self._data_key == 'pressure' and value == 0:
return False
self._state = round(value, 2)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switch/tplink.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SmartPlugSwitch(SwitchDevice):
def __init__(self, smartplug, name):
"""Initialize the switch."""
self.smartplug = smartplug
self._name = None
self._name = name
self._state = None
# Set up emeter cache
self._emeter_params = {}
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 = 56
PATCH_VERSION = '1'
PATCH_VERSION = '2'
__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 e620479

Please sign in to comment.