Handle numeric device id for rfxtrx devices (#2740)
This commit is contained in:
parent
0377338a81
commit
23472cb44d
2 changed files with 2 additions and 1 deletions
|
@ -66,6 +66,7 @@ def _valid_device(value, device_type):
|
|||
key = device.get('packetid')
|
||||
device.pop('packetid')
|
||||
|
||||
key = str(key)
|
||||
if not len(key) % 2 == 0:
|
||||
key = '0' + key
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class TestSwitchRfxtrx(unittest.TestCase):
|
|||
'switch': {'platform': 'rfxtrx',
|
||||
'automatic_add': True,
|
||||
'devices':
|
||||
{'710000141010170': {
|
||||
{710000141010170: {
|
||||
'name': 'Test',
|
||||
rfxtrx_core.ATTR_FIREEVENT: True}
|
||||
}}}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue