From 7b1ec418f2c08594a1ed3b88e7158aee5e574597 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 30 Mar 2016 16:19:44 +0200 Subject: [PATCH] Fix crash of Rfxtrx component when using config option fire_event --- homeassistant/components/light/rfxtrx.py | 2 +- homeassistant/components/switch/rfxtrx.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/light/rfxtrx.py b/homeassistant/components/light/rfxtrx.py index 79c4640a55a..a97f98e750a 100644 --- a/homeassistant/components/light/rfxtrx.py +++ b/homeassistant/components/light/rfxtrx.py @@ -107,7 +107,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): rfxtrx.RFX_DEVICES[device_id].hass.bus.fire( EVENT_BUTTON_PRESSED, { ATTR_ENTITY_ID: - rfxtrx.RFX_DEVICES[device_id].device_id, + rfxtrx.RFX_DEVICES[device_id].entity_id, ATTR_STATE: event.values['Command'].lower() } ) diff --git a/homeassistant/components/switch/rfxtrx.py b/homeassistant/components/switch/rfxtrx.py index 2dfbf93a33f..4d70c01b6cb 100644 --- a/homeassistant/components/switch/rfxtrx.py +++ b/homeassistant/components/switch/rfxtrx.py @@ -94,7 +94,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): rfxtrx.RFX_DEVICES[device_id].hass.bus.fire( EVENT_BUTTON_PRESSED, { ATTR_ENTITY_ID: - rfxtrx.RFX_DEVICES[device_id].device_id, + rfxtrx.RFX_DEVICES[device_id].entity_id, ATTR_STATE: event.values['Command'].lower() } )