Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96018

Media player state condition not working

$
0
0

@PeteS wrote:

Hello, I’m trying to automate my lights and part of that is that I don’t want them to turn off when we’re watching TV. I’ve tried a state condition and a template condition with no success. Currently I have the below:

- id: '1575647713901'
  alias: Living Room Off PIR
  description: ''
  trigger:
  - entity_id: binary_sensor.living_room_pir_sensor_occupancy
    for: 00:15:00
    from: 'on'
    platform: state
    to: 'off'
  condition:
  - condition: template
    value_template: "{{ states('media_player.living_room_shield') == 'off' }}"
  action:
  - data:
      entity_id: light.living_room
    service: light.turn_off

Testing the template in the developer tools returns False but when I trigger the automation, the lights still turn off. I’ve got Home Assistant running on my RPi3 using docker and the version/build is 0.101.0.dev20191018.

Please help!

Posts: 6

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 96018

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>