You may have seen this in the error logs when upgrading HA, but I’ll add a link here so that you can find the correct format for the condition. It can be kinda tough to find in the docs since the terms you’d search for are pretty common.
automation:
trigger:
platform: homeassistant
# Event can also be 'shutdown'
event: start
@ih8gates – Thanks, I’ve been seeing this deprecation warning in my logs regarding 0.45 release. However, when I changed the automation below Home Assistant doesn’t seem to like it. Here’s what I have right now:
- alias: Fluxer Switch On By Default
trigger:
platform: event
event_type: homeassistant_start
action:
service: homeassistant.turn_on
entity_id: switch.fluxer
Based on my understanding this should change to the format below:
- alias: Fluxer Switch On By Default
trigger:
platform: homeassistant
event_type: start
action:
service: homeassistant.turn_on
entity_id: switch.fluxer
Is this right? I have several automation using the deprecated homeassistant_start event_type, however, this is just one example.
Sorry if I’m bumping an old post, but I’m trying to add a new automation trigger based on the new syntax, but the event is not being fired.
This is my configuration:
automation:
alias: "Lights off on HA start"
initial_state: 'on'
trigger:
platform: homeassistant
event: start
action:
service: light.turn_off
I’m looking at the dev-state page and I see:
Entity: automation.lights_off_on_ha_start State: on Attributes: last_triggered: null, friendly_name: Lights off on HA start
Did you get this fixed? I’m having the same issue with hiding groups on start. Code below does not work. Used to work before, with the homeassistant_start pre-0.45 change.
The homeassistant start event is working for me - I have a notification that triggers whenever HA boots up.
I’m wondering if you’ve got an issue here where you’re trying to manipulate groups before they’re created? If “start” fires off immediately, even before groups are parsed.
What if you put a delay of a few seconds at the start of that action?
ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: not a valid value for dictionary value @ data['trigger'][0]['event']. Got None. (See /home/mihai/.homeassistant/configuration.yaml, line 345). Please check the docs at https://home-assistant.io/components/automation/
However, the startup automation is working. What to do to remove the error?
Been using this awesome piece of software for a while but after my rebuild I am seeing an incomplete graph. The major difference is that most stuff is now in packages, could that be the cause?