Venicenerd Posted December 8, 2021 Posted December 8, 2021 Hey guys, I created some custom devices (switches) for Home Assistant using ISY programs using this guide: https://www.home-assistant.io/integrations/isy994/#creating-custom-devices-using-isy-programs Everything works great, however, in the HA dashboard the custom switch turns right back off after I turn it on. It doesn't actually execute the "off" action but the GUI switch turns off. Furthermore, the status of the custom ISY switch does not seem to sync through to my HomeKit. I can execute the switch from HomeKit perfectly (both on and off - it also stays on here) but the status doesn't sync to HA. It seems there is something funky going on with the way HA displays this custom Isy Program Switch. Does anyone have any experience with this?
shbatm Posted January 1, 2022 Posted January 1, 2022 Make sure you use a state variable and not an integer variable for the status. Integer variables will not update.
Venicenerd Posted January 1, 2022 Author Posted January 1, 2022 10 minutes ago, shbatm said: Make sure you use a state variable and not an integer variable for the status. Integer variables will not update. Oh! How can I tell which variable I created???
shbatm Posted January 1, 2022 Posted January 1, 2022 In the Admin Console check which tab you are on under Variables.
Venicenerd Posted October 18, 2022 Author Posted October 18, 2022 On 1/1/2022 at 8:19 PM, shbatm said: Make sure you use a state variable and not an integer variable for the status. Integer variables will not update. Ahh! Ok so I did it wrong and created Integer variables just like you said! Can I just delete the Integer Variables and re-create a State Variable with the same name or do I need to do anything else to fix this? Thanks for the help!
larryllix Posted October 18, 2022 Posted October 18, 2022 (edited) 3 hours ago, Venicenerd said: Ahh! Ok so I did it wrong and created Integer variables just like you said! Can I just delete the Integer Variables and re-create a State Variable with the same name or do I need to do anything else to fix this? Thanks for the help! Here is what I would do. Create a new variable in the State tab. Most use a prefix like this $sXXXXXXXX to indicate it is a state variable. Some (I don't) use an "i" prefix for Integer variables also. Select the line in the program, and change the variable name (below) to the new state variable, Update, and then Save the program. Now go back to your Integer variable tab and delete the useless variable. (clean up on aisle 2) Edited October 18, 2022 by larryllix
MrBill Posted October 18, 2022 Posted October 18, 2022 4 hours ago, Venicenerd said: Ahh! Ok so I did it wrong and created Integer variables just like you said! Can I just delete the Integer Variables and re-create a State Variable with the same name or do I need to do anything else to fix this? Thanks for the help! name them at least slightly differently or the HA side will confuse you. The original entity will stay around, and if they are identical names it will confuse you on the Home Assistant side. Using Developer tools you can manually call the service "isy994.cleanup_entities" to get rid of the old entity. its takes a few steps tho: remove it on the ISY side restart HA core ("reload isy994" probably is enough but I usually restart core for this) in the HA interface:
Recommended Posts