I have created command_line switches to enable/disable Hue Motion Sensors and everything has been perfect for ages. It seems now that any version I upgrade to beyond 2023.3.6 breaks the switches.
The strange thing is they work most of the time but then randomly go haywire and either show a broken icon or just show status as off when they are on.
I have verified they are on when they do this in the Hue app.
This works 100% in 2023.3.6, everything beyond that breaks it and I cannot figure out why. As mentioned the switches still work just the status randomly goes haywire then will recover again and it’s random as to which of the 7 command_line switches will play up. It’s like it fails to get the status however it never fails in HA 2023.3.6.
I am assuming something has changed in the later HA builds but so far I haven’t been able to figure out what and it’s stopping me upgrading at the moment as I need that functionality to continue working. It did improve at one point as one build showed messy icons for the switches and the next was fine but still with status of the switches not working correctly all the time.
But the old format should still work, and it will keep on working until at least release 2023.08, so for now nothing changed and the are just warning’s
I am having the same problems. Had multiple working switches with state setup and now cannot get any of those switches working after converting to the new yaml format. Getting command line 127 errors or taking too long to respond. Everything just worked in the old syntax, so why did we need to switch?
Yeah I have no idea why it’s all broken. It’s definitely Home Assistant changes that have done it. If I query Hue manually all the correct replies are returned. It’s really annoying as I have been sat on an old version of Home Assistant now for ages as a result.
The newer versions also destroyed all the colour customisations I made. I know they made it clear they were changing them but they seem to remove more things than they fix lately.
I’m not sure if this will help with your issues but I discovered that my command line Hue Motion Sensor switches (to enable and disable the sensors) were working with say 1, 2 or possibly 3 switches but when I added more it started to play up. I since had the thought that maybe it was triggering all the switch queries at the same time and the Hue bridge was blocking some of them because all of a sudden 6 queries were being done at the same time.
I have now set the scan_interval of each one to a slightly different value (ie. 15 secs, 16 secs, etc.). This appears to be solving the issue here. Obviously it means some of them take slightly longer to detect a change but I can live with that if they stop randomly showing off when they are on!