Add log info in the rfxtrx component

pull/596/head
badele 2015-11-08 11:04:29 +01:00
parent 0c97280479
commit ebc95aca51
3 changed files with 14 additions and 0 deletions

View File

@ -59,6 +59,11 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
# Check if entity exists or previously added automatically # Check if entity exists or previously added automatically
if entity_id in rfxtrx.RFX_DEVICES: if entity_id in rfxtrx.RFX_DEVICES:
_LOGGER.info(
"EntityID: %s light_update. Command: %s",
entity_id,
event.values['Command']
)
if event.values['Command'] == 'On'\ if event.values['Command'] == 'On'\
or event.values['Command'] == 'Off': or event.values['Command'] == 'Off':
if event.values['Command'] == 'On': if event.values['Command'] == 'On':

View File

@ -43,6 +43,10 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
rfxtrx.RFX_DEVICES[entity_id] = new_sensor rfxtrx.RFX_DEVICES[entity_id] = new_sensor
add_devices_callback([new_sensor]) add_devices_callback([new_sensor])
else: else:
_LOGGER.info(
"EntityID: %s sensor_update",
entity_id,
)
rfxtrx.RFX_DEVICES[entity_id].event = event rfxtrx.RFX_DEVICES[entity_id].event = event
if sensor_update not in rfxtrx.RECEIVED_EVT_SUBSCRIBERS: if sensor_update not in rfxtrx.RECEIVED_EVT_SUBSCRIBERS:

View File

@ -61,6 +61,11 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
# Check if entity exists or previously added automatically # Check if entity exists or previously added automatically
if entity_id in rfxtrx.RFX_DEVICES: if entity_id in rfxtrx.RFX_DEVICES:
_LOGGER.info(
"EntityID: %s switch_update. Command: %s",
entity_id,
event.values['Command']
)
if event.values['Command'] == 'On'\ if event.values['Command'] == 'On'\
or event.values['Command'] == 'Off': or event.values['Command'] == 'Off':
if event.values['Command'] == 'On': if event.values['Command'] == 'On':