mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
* Issue #6893 in rfxtrx * Update rfxtrx.py * rfxtrx issue
This commit is contained in:
parent
3e0eb8763f
commit
aa8dd8fbdd
@ -77,10 +77,6 @@ def _valid_device(value, device_type):
|
|||||||
if not len(key) % 2 == 0:
|
if not len(key) % 2 == 0:
|
||||||
key = '0' + key
|
key = '0' + key
|
||||||
|
|
||||||
if get_rfx_object(key) is None:
|
|
||||||
raise vol.Invalid('Rfxtrx device {} is invalid: '
|
|
||||||
'Invalid device id for {}'.format(key, value))
|
|
||||||
|
|
||||||
if device_type == 'sensor':
|
if device_type == 'sensor':
|
||||||
config[key] = DEVICE_SCHEMA_SENSOR(device)
|
config[key] = DEVICE_SCHEMA_SENSOR(device)
|
||||||
elif device_type == 'binary_sensor':
|
elif device_type == 'binary_sensor':
|
||||||
@ -292,6 +288,9 @@ def get_devices_from_config(config, device, hass):
|
|||||||
devices = []
|
devices = []
|
||||||
for packet_id, entity_info in config[CONF_DEVICES].items():
|
for packet_id, entity_info in config[CONF_DEVICES].items():
|
||||||
event = get_rfx_object(packet_id)
|
event = get_rfx_object(packet_id)
|
||||||
|
if event is None:
|
||||||
|
_LOGGER.error("Invalid device: %s", packet_id)
|
||||||
|
continue
|
||||||
device_id = slugify(event.device.id_string.lower())
|
device_id = slugify(event.device.id_string.lower())
|
||||||
if device_id in RFX_DEVICES:
|
if device_id in RFX_DEVICES:
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user