Hello,
Im trying to use scripts I have set up to turn on some lights but they are not showing up when i try to add them to a widget.
I used to have a script setup on my iPhone 16 pro but now that i have changed my phone to the standard iPhone 16 the scrips wont show up.
I have removed all devices just incase there was any conflict.
When Looking at the debugging logs I get the following errors - {“error”: "The operation couldn’t be completed. (HAKit.HADataError error}
Any help as to where I am going wrong would be greatly appreciated
I had same issue and “fixed” it once I reloaded widgets. Go to iOS HA application, settings → Companion app → Widgets and press “reload all widgets”. Widgets should show scripts now.
Hi medojr,
thanks for your help but unfortunately this hasn’t worked.
Ive looked at the debug logs but cant make much sence of them and not sure if this is related to the problem.
“Failed to fetch states on server Home”
having the same issue…it can see scripts that have been there for ages but if I delete one or add a new one it never registers the changes (at least not wihtin an hour of making said changes)
@medojr I don’t have a “Widgets” menu under the companion app settings. Does this have to be enabled somewhere? I am running HA 2025.1 and (as far as I can tell) the latest iOS app.
More info… I cannot seem to get any data to show in any HA widgets. I have tried the custom, script, and sensor widgets. All of them show “No Items” when I go to select the specfic entities that should apply to each widget. Is there something I am missing about exposing HA objects to iOS?
Hi,
if you never had created a widget on one of your homescreens on iOS the menu point is missing in the Companion App section. To get the menu point you have to create a widget first.
But even after this and reloading widgets, I didn’t get new scripts listet in this action menu. What the hack? Is there already a bug filed at bugzilla about this?
Greetings
Jens
I’ve found out, that there is perhaps a missunderstanding between Automations and Scripts. This could happen easily because Automations are often also mentioned and names as Scripts.
In the iOS Companion App are no automations listed, only the Scripts will be listet. Please check in the HASS Settings Menue if there are Scripts defined, they should show up in the iOS App:
I had the same problem. I can affirm it is about scripts indeed. App restart had no effect, phone reboot had no effect. When I checked again a few hours later, the scripts were just shown on the phone. I added a new script for testing and it showed up faster this time. I have no idea what was hanging in the meantime.
Also home assistant widgets are not working as supposed on this iphone. I’m suspecting the age/compatibility of the phone even though it runs the current version of iOS.
I had the same problem and opened a ticket in Github. They quickly found the problem and I was able to fix it. This was their response:
I think I found the issue, your App database is not being updated because there is one (or more) zone entities in your Home Assistant (probably from custom integration) that does not contains a mandatory field “latitude”, since this is not optional for zones, the App fails to parse.
In my case, I found an unused zone entity that was unavailable, related to my Home Assistant Remote custom integration. I removed that zone and now I can see all scripts and scenes.
I use a Cloudflare tunnel to access my server when away from home and having an access policy requiring to insert an OTP seems to break a lot of stuff in the companion app, including the scripts list refreshing in widgets and the widgets’ functionality in general.
I tried changing the policy to a simple bypass when a condition is met and indeed it worked.
For now I’d rather have the extra security layer, so I turned it back on, but for anyone else that experiences similar issues, this might be one of the reasons.
Unfortunately, that didn’t help in my case. I deleted all zones except Home, but the scripts still don’t appear in the Companion App. I’m really out of ideas at this point.