I’m having some scripts to handle my covers. My idea behind is to be able to run the scripts manually but also use the same scripts in automations. It works like expected most of the time. But sometimes - like today in the morning - the scripts won’t do anything when triggered, neither manually nor automaticaly. After restarting hass.io, its working again. So I was wondering what the cause is.
The covers were still responding since I was able to open the covers manually. As I said, after a restart of Hass.io everything was back to normal. Any ideas?
One of the automations that triggers the script:
- alias: "Open covers in the morning"
trigger:
- platform: time
at: '07:30:00'
action:
- service: script.open_all_covers
Did you look for any errors in the logs? Typically if an automation stops working, it has to do with the connectivity with a device or the device itself.
Automation didn’t stop and the script was triggered. It just didn’t do anything. Also when I started the script manually (or all of them step by step). Is it that group.all_covers was broken after a while?
Yes, that’s expected with hardware failures. If your light switch isn’t working and you have an automation that turns on the light switch, would you expect the automation to stop working? No. It would continue to do its job but the light wouldn’t turn on. So, what I’m saying is that you need to check your hardware devices and check the home assistant error logs. If your hardware is failing, it will be in the logs every time it tries to execute the automation. The automation will fire, and you’ll get an error in the logs if the hardware can’t be reached. Now you just need to figure out if its purely hardware, or the software component that runs the hardware.
Things that lead typically to issues:
changes in your network.
hardware failures.
network connectivity issues.
All of these will typically appear to be issues with your hardware.
Ok, now thats really odd. So the script stopped working today in the morning and so I did some investigations:
The group.all_covers disappeared in the morning and therefore my scripts couldn’t do anything. I checked my config files and found that group.all_covers wasn’t defined anywhere. But I remembered that I triggered the scripts yesterday and that they were working.
So I rebooted hass.io and guess what? group.all_covers was there again as an entity! So whats going on here? Why is it keeping disappearing after a while?
As a workaround I’ll use a different „hardcoded“ group for my covers but that is really odd, isn’t it?
Ab btw: no log file entries regarding group.all_covers.
I have found the bug:
If I call “reload groups” to load my changed groups configuration, the generic groups (all_scripts etc) mentioned before disappear.
Post it to github homeassistant if it hasn’t already been done. May want to do full restarts until then. Something like that may be seen as a low priority if there is a work around.