RFXTRX and X10 configuration

I have seen comments about using Heyu to setup HA with X10 but i think it could be simpler if you have the RFXCOM RFXTRX device connected. But there is an issue that i don’t seem to be able to overcome.
I am using a RPi2 with rfxtrx433 and a CM15a to talk to X10 devices. the rfxtrx also communicates successfully with LighwaveRF and HomeEasy EU devices without any issues.
I also have Wemo and Zwave on the go too in a bid to try different technologies to see which i prefer. X10 is legacy and what i started with so have a few devices if i can still use them easily enough.
Using an old Marmitek 8in1 remote control i activated an X10 inline relay and this was successfully detected by HA and added as a switch on the front end. i could switch the device on and off using HA without any problems. the device was identified as 0710000041030160 on the frontend and as switch.0710000041030160 in the states page under developer tools.
My issue arises when i try to add this to the configuration.yaml file, the snapshot with the other devices looks like:
switch:
platform: rfxtrx
automatic_add: true
signal_repetitions: 3
devices:
0a140000f5372e01010060:
name: Lounge_Table_Lamp
0b1100000032284202010f70:
name: Conservatory
0b1100000032284203010f50:
name: Porch
the above is the good bit and works fine until i add the newly detected X10 device to the list as:
0710000041030160:
name: Kitchen

i restart HA and then when i check the fronted, all the original switches have disappeared and i get the following in the log file:
homeassistant.bootstrap: Invalid config for [switch.rfxtrx]: Rfxtrx device 31336090054768 is invalid: Invalid device id for OrderedDict([(‘0a140000f5372e01010060’, OrderedDict([(‘name’, ‘LoungeTableLamp’)])), (‘0b1100000032284203010f60’, OrderedDict([(‘name’, ‘Porch’)])), (‘0b1100020032284202010f50’, OrderedDict([(‘name’, ‘Conservatory’)])), (31336090054768, OrderedDict([(‘name’, ‘Kitchen’)]))]) for dictionary value @ data[‘devices’]. Got OrderedDict([(‘0a140000f5372e01010060’, OrderedDict([(‘name’, ‘LoungeTableLamp’)])), (‘0b1100000032284203010f60’, OrderedDict([(‘name’, ‘Porch’)])), (‘0b1100020032284202010f50’, OrderedDict([(‘name’, ‘Conservatory’)])), (31336090054768, OrderedDict([(‘name’, ‘Kitchen’)]))])

If i remove the offending addition, the original switches reappear in the front end.
I suspect it is the syntax required to add the device that is the challenge, if i don’t add it to the config then there is no problem, i could activate the remote following a restart and control manually from the front end but i want to automate these under cabinet lights to switch on at sunset without manual intervention. I would rather not have to install Heyu if i don’t need to.
i have also tried adding it as switch.0710000041030160 too with similar results as well as wondering if it needed to be converted from hex to dec or visa versa and tried that approach.

I have LightwaveRF inline relays on hand to replace both the X10 one and a Fibaro Zwave one that i don’t seem to be able to include into the zwave network.
any help gratefully accepted, i am also in the process of writing myself a step by step guide having already had to rebuild the Pi due to SD card problems and original notes not quite good enough.

apologies for the long post.

thanks in advance
Paul

It seems to be a bug related to that the device id has only numbers. So you should report it here: https://github.com/home-assistant/home-assistant/issues/new

A workaround would be to add quotes around the id:

'0710000041030160':
  name: Kitchen

Thank you Daniel
The workaround did the trick, which means i can still use some of my X10 legacy kit

regards
Paul

You should still report it as a bug, so we can solve it for other users.

will do but just having difficulty creating github account to get in in the first place!

posted, need to add i am not used to using these software tools, more of a hardware engineer than a software one :slight_smile: