Ok, so here’s the deal. I’ve set this thing up on an RPi 5, and added 5 devices in test. 4 switches, and one temperature sensor that never seemed to work right on Hubitat. (works fine now by the way).
Once I got those set up, I put some of them on a dashboard. Works fine.
Now I’m trying to get ONE automation working so that I can see it work as sort of a POC before I start moving all the live devices over from Hubitat.
The problem is setting up automations on this thing is like using a protractor to increase the odds of conception. It’s ridiculously complicated. But that’s ok, I’ve worked with IBM products before. They hold the title for needless complication. The thing that makes Home Assistant different is there’s actually something worthwhile at the end of the rainbow. So I’m giving it a shot.
I came here today to determine what was specifically wrong with a very short script. I need an answer, not a library. I’m happy to surf the learning curve once I can determine this is a worthwhile migration. So far it looks like a headache factory. But that’s ok. I don’t mind working to overcome the challenge in the long term. But I do mind doing it to prove a concept.
Right now I have two pieces left to make the decision. This script, and Alexa integration. The second connected fine but can’t find a single device. I’ll continue to work through that. If I can’t solve the problem by the end of the Nabu trial, HA is off the table.
But when it comes to automations, the “visual editor” is not an option. Mostly because it is no more intuitive than text. So learning anything about it is pointless, to me anyway. That’s why I’m starting with the YAML code. Because if I keep this thing I won’t be using anything else until another option presents itself. If I can understand why a basic timer isn’t working, that would cause me to believe I can work through any issue. That’s all I’m after.
So, whatever these things are called in this community, in the HA browser interface I went to Settings> Automations & Scenes> +Create Automation> Create New Automation> Top right “Edit in YAML”. There I put in the following, which is erroring out on save…
[Begin YAML] (line 1 is automation:")
automation:
-
alias: “Turn on switch an hour after sunset”
trigger:
platform: sun
event: sunset
offset: “01:00:00”
action:
service: switch.turn_on
target:
entity_id: switch.z_wave_outdoor_smart_plug
-
alias: “Turn off switch at 10:30 PM”
trigger:
platform: time
at: “22:30:00”
action:
service: switch.turn_off
target:
entity_id: switch.z_wave_outdoor_smart_plug
[End of YAML]
What’s wrong? Yes, I already removed the “automation:” line and tested. No joy.