Can't get any automations to work

I’ve been trying to make some automations, but none of them seem to work. I’ve tried 3 different triggers and two different services.


input_select:
  light_mode:
    name: Red Room Light Mode
    options:
    - Temperature
    - Color
    - Rainbow
    initial: Temperature

automation:
# Publish the light mode when it changes
  - alias: Select light mode
    trigger:
      platorm: state
      entity_id: input_select.light_mode
    action:
      - service: persistent_notification.create
        data:
          message: something changes
      - service: mqtt.publish
        data:
          topic: "/office/rgb1/light/mode"
          payload_template: "{{ states.input_select.light_mode.state }}"

# Publish the time at the start of each minute
  - alias: Set time
    trigger:
      platform: time
      seconds: '0'
    action:
      - service: mqtt.publish
        data:
          topic: "/office/rgb1/light/time"
          payload_template: "{{ states.sensor.time }}"

# Publish the temperature when it changes
  - alias: Set temp
    trigger:
      platform: numeric_state
      entity_id: sensor.pws_temp_f
    action:
      service: mqtt.publish
      data:
        topic: "/office/rgb1/light/temp"
        payload_template: "{{ states.sensor.pws_temp_f.state }}"

I did test all of the service calls using the Services developer tool, and I verified the entity_ids in the States tool. The log shows no errors, the actions just aren’t happening.

Any ideas?

Do you see any errors in your logs? Search the logs for automation and see if all your automations were initialized.

Ah, found it. There was a typo where I had platorm instead of platform.

hass --script check_config is super helpful.

1 Like

+1 with hass --script check_config feature …

Also I use very often this just to validate that, at least, the yaml is ok: http://www.yamllint.com/