mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Handle numeric device id for rfxtrx devices (#2740)
This commit is contained in:
parent
0377338a81
commit
23472cb44d
@ -66,6 +66,7 @@ def _valid_device(value, device_type):
|
|||||||
key = device.get('packetid')
|
key = device.get('packetid')
|
||||||
device.pop('packetid')
|
device.pop('packetid')
|
||||||
|
|
||||||
|
key = str(key)
|
||||||
if not len(key) % 2 == 0:
|
if not len(key) % 2 == 0:
|
||||||
key = '0' + key
|
key = '0' + key
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class TestSwitchRfxtrx(unittest.TestCase):
|
|||||||
'switch': {'platform': 'rfxtrx',
|
'switch': {'platform': 'rfxtrx',
|
||||||
'automatic_add': True,
|
'automatic_add': True,
|
||||||
'devices':
|
'devices':
|
||||||
{'710000141010170': {
|
{710000141010170: {
|
||||||
'name': 'Test',
|
'name': 'Test',
|
||||||
rfxtrx_core.ATTR_FIREEVENT: True}
|
rfxtrx_core.ATTR_FIREEVENT: True}
|
||||||
}}}))
|
}}}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user