Merge pull request #596 from badele/dev

Minor change for logger component
This commit is contained in:
Paulus Schoutsen 2015-11-08 19:57:58 -08:00
commit 3a095f53a8
4 changed files with 26 additions and 2 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
if entity_id in rfxtrx.RFX_DEVICES:
_LOGGER.debug(
"EntityID: %s light_update. Command: %s",
entity_id,
event.values['Command']
)
if event.values['Command'] == 'On'\
or event.values['Command'] == 'Off':
if event.values['Command'] == 'On':

View File

@ -8,13 +8,23 @@ https://home-assistant.io/components/logger.html
Sample configuration
# By default log all messages and ignore log event lowest than critical
# for custom omponents
logger:
default: critical
default: info
logs:
homeassistant.components: debug
homeassistant.components.device_tracker: critical
homeassistant.components.camera: critical
# By default ignore all messages lowest than critical and log event
# for custom components
logger:
default: critical
logs:
homeassistant.components: info
homeassistant.components.rfxtrx: debug
homeassistant.components.device_tracker: critical
homeassistant.components.camera: critical
"""
import logging
from collections import OrderedDict

View File

@ -43,6 +43,10 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
rfxtrx.RFX_DEVICES[entity_id] = new_sensor
add_devices_callback([new_sensor])
else:
_LOGGER.debug(
"EntityID: %s sensor_update",
entity_id,
)
rfxtrx.RFX_DEVICES[entity_id].event = event
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
if entity_id in rfxtrx.RFX_DEVICES:
_LOGGER.debug(
"EntityID: %s switch_update. Command: %s",
entity_id,
event.values['Command']
)
if event.values['Command'] == 'On'\
or event.values['Command'] == 'Off':
if event.values['Command'] == 'On':