It’ at the top
I already scrolled back 3 hours to your suggestion, which looks like it’s the fix to me. Cba to scroll back any further
Hehehe no I meant the time sensor is a the top
I reckon you’ve solved it anyway
I tried with another automation and it worked
- alias: 'Kaffe på morgonen under helgen'
initial_state: true
trigger:
- platform: template
value_template: '{{ states.sensor.time.state == states.input_select.coffemaker.state }}'
# - plattform: state
# entity_id: input_boolean.coffeornot
# state: on
# - platform: time
# at: 08:30:00
condition:
- condition: state
entity_id: input_select.status_hemma
state: Hemma
# - condition: time
# weekday:
# - sat
# - sun
action:
- service: homeassistant.turn_on
entity_id: switch.net_perkulator
When trying on the first automation i get this error:
2018-02-19 20:54:35 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data[‘trigger’][1][‘platform’]. Got None. (See /config/configuration.yaml, line 72). Please check the docs at https://home-assistant.io/components/automation/
2018-02-19 20:54:35 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data[‘trigger’][2][‘platform’]. Got None. (See /config/configuration.yaml, line 72). Please check the docs at https://home-assistant.io/components/automation/
Automation:
- alias: 'God morgon'
initial_state: true
trigger:
# - platform: time
# at: 07:00:00
- platform: template
value_template: '{{ states.sensor.time.state == states.input_select.wake_up_time.state }}'
- platform: state
entity_id: group.all_devices
to: home
- plattform: state
entity_id: input_boolean.alarmstatus
state: on
condition:
- condition: state
entity_id: group.all_devices
state: home
- condition: state
entity_id: input_select.status_hemma
state: 'Hemma'
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
input_select:
#alarm / soluppgång
wake_up_time:
name: 'Alarm soluppgång'
options:
- "00:00"
- "00:15"
- "00:30"
input_boolean:
alarmstatus:
name: Wake Me Up
initial: off
icon: mdi:alarm-check
You have to specify that you want multiple conditions.
If you do it like that it defaults to and
, I use it like that a lot.
Other automations works with several conditions without
condition: and
conditions:
My guess is that the error is within the trigger.
automation:
- alias: ‘God morgon’
initial_state: true
trigger:- platform: template
value_template: ‘{{ states.sensor.time.state == states.input_select.wake_up_time.state }}’ - platform: state
entity_id: group.all_devices
to: home - plattform: state
entity_id: input_boolean.alarmstatus
state: on
- platform: template
How is this defined now?
#alarm / soluppgång
wake_up_time:
name: 'Alarm soluppgång'
options:
- "00:00"
- "00:15"
Well now its working, must have missed something when i copied from the other working automation.
But there is another part i dont get to work:
- platform: state
entity_id: input_boolean.coffeornot
state: on
I’m not sure how this can work as you are comparing apples and oranges
When you say it doesn’t work what do you mean? Is there any error in the logs?
2018-02-19 22:43:42 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [state] is an invalid option for [automation]. Check: automation->trigger->1->state.
It has to be to: not state:
Sorry i dont really get that
- platform: state
entity_id: input_boolean.coffeornot
to: 'on'
2018-02-19 23:46:47 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: expected str for dictionary value @ data[‘trigger’][1][‘to’]. Got None
- alias: 'Kaffe på morgonen under helgen'
initial_state: true
trigger:
- platform: template
value_template: '{{ states.sensor.time.state == states.input_select.coffemaker.state }}'
# - platform: time
# at: 08:30:00
- platform: state
entity_id: input_boolean.coffeornot
to: on
condition:
- condition: state
entity_id: input_select.status_hemma
state: Hemma
# - condition: time
# weekday:
# - sat
# - sun
action: