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

How to turn a scene off? No scene.turn_off

$
0
0

@DaveUK83 wrote:

Hi,
I’ve managed to create it so that a scene is activated when a door is opened during a certain time, however I can’t seem to get it to work to turn the lights off when the door is closed. This is my current code:

alias: Bedroom Door Closed
  description: Night closing for bathroom
  trigger:
  - entity_id: binary_sensor.bedroom_door_contact
    from: 'on'
    platform: state
    to: 'off'
  condition:
  - after: '16:00:00'
    condition: time
  - condition: and
    conditions:
    - before: sunrise
      before_offset: '+20:00'
      condition: sun
  action:
  - data:
      entity_id: scene.bathroom_bedroom
    service: homeassistant.turn_off

I use scene.turn_on as the service to activate the scene, however can’t find what to use to turn off. I tried homeassistant.turn_off, but no joy.

Any help appreciated.

Posts: 16

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 95991

Trending Articles



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