Automation - help!

Hi all

Forgive me for the noob-ness here, but any help with one of my attempted automatons would be much appreciated.

It’s pretty simple in principle - TV on, lights down. But I cannot get it to work! I have checked the states of the TV in ‘states’ when switching on/off, and they appear correct. Both the automation and scene also seem to execute fine independently.

The automation in(automation.yaml) is as follows:

- id: '1606171809276'
  alias: TV on lights down
  description: ''
  trigger:
  - platform: state
    entity_id: media_player.sony_bravia_tv
    from: 'Off'
    to: 'On'
  condition: []
  action:
  - scene: scene.tv_time
  mode: single

And the scene (scenes.yaml) to activate:

- id: '1606171457570'
  name: Tv time
  entities:
    light.living_room_lamp:
      brightness: 15
      friendly_name: Living Room Lamp
      supported_features: 1
      state: 'on'
    light.living_room_tall:
      brightness: 15
      friendly_name: Living Room Tall
      supported_features: 1
      state: 'on'
    light.hallway:
      brightness: 25
      friendly_name: Hallway
      supported_features: 1
      state: 'on'
    light.landing:
      brightness: 25
      friendly_name: Landing
      supported_features: 1
      state: 'on'
  icon: mdi:mdi-television-clean

Thanks in advance for any advice you can offer.

Cheers

Should be:

    from: 'off'
    to: 'on'

See the developer tools states menu for the actual states of entities. Lovelace can change how they are displayed.

1 Like

Change (in your automation trigger)

    from: 'Off'
    to: 'On'

to

    from: 'off'
    to: 'on'

Awesome - thanks guys. Working now!