mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Merge pull request #596 from badele/dev
Minor change for logger component
This commit is contained in:
commit
3a095f53a8
@ -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':
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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':
|
||||
|
Loading…
x
Reference in New Issue
Block a user