As a starter with HA i’m running into some strange behavior - which is hopefully explainable… I have setup my RFXCOM device on HA and it is auto-adding the devices received from the KAKU remote.
But the devices are added with an on/off switch of two flashes, where my MQTT switches have a nice looking on/off toggle. I cannot find any way to change the (actual)switch icon. The device icon is easy to setup
See:
Hopefully someone would be able to get me in the right direction!? Thanks!
The easiest is to change the switch.xyz_very_long_code to light.xyz_very_long_code. Just copy the same numbers and letters behind switch. to light. and it will act as a light.
I had the exact same problem and managed to resolve it by setting the assumed_state parameter to false in the customize.yaml file for every problematic device.
This is due to the fact that RFXTRX platform does not allow state reporting of a device. The workaround on HA side was to assume that the state of the device changed after an order. But in case the device state did not changed, you can still click on the correct button in the frontend.
Thanks for your reply! I thinkg your solution is just to assume that the device is off - due the lack of reporting on the RFXTRX. Just setting the state is not what i’m looking for.
I would like to have the same switch as the other switches (ho_links, ho_right) as shown in the image in my original post. Basically purely cosmetic. Another thing is to add some MQTT bit and pieces and have the RXTX trigger some automation.
Just an update from my end. I found myself a solution Here is my solution for the next one who runs into this issue.
I have replaced the rfxtrx button for an MQTT button. I basically publish in a command topic, an automation publishes to the state topic and calls the light.turn_on service. Pieces of my config:
I would suggest you to try custom:button-card, this avoids you to do “hacky” stuff like you did here and those buttons are really flexible in every way.
Your solution would work perfectly fine though. But this button will make your setup a whole lot better. Here is an example of one of those buttons:
I warn you though, it is probably a bit daunting for beginners. Though, I am always willing to help out (via discord and/or remote desktop) if you so desire. I see you are Dutch and if you live reasonably close to Eindhoven I could even come to help out.
For an easier solution you could check my older repos on github (they are a bit easier to understand). I hope this helps you out.