Cant get input_select working

It’ at the top :stuck_out_tongue:

I already scrolled back 3 hours to your suggestion, which looks like it’s the fix to me. Cba to scroll back any further :sunglasses:

Hehehe no I meant the time sensor is a the top :stuck_out_tongue:

I reckon you’ve solved it anyway :+1:

1 Like

I tried with another automation and it worked :ok_hand:

- 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

@keithh666 is it the same with “initial: off” on input_boolean?

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

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 :stuck_out_tongue:

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 :face_with_raised_eyebrow:

- 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: