Conditions in scenes

Would be good to have conditions in scenes. For example I have a good night scene that switches everything off at night - however sometimes the NAS needs to stay on depending on whether people are still logged in. This can be achieved with to different automation rules but it would be more efficient and easier to read if scenes could contain conditions for some actions.

I can understand readability, but adding conditions, etc to scenes turns them into scripts with a different layout, not practical and redundant. You should simply create a script instead of a scene as scripts can be given icons and friendly names and placed on the frontend just like scenes, but with all the benefits of conditionals. I have no scenes at all as I have turned them all into scripts instead.

If you really want to retain the scene, then simple activate a script from within the scene that checks conditions for the NAS:

scene:
 - name: Movies
    entities:
      light.tv_back_light:
        state: on
        brightness: 100
      light.ceiling: off
      script.check_nas: on
4 Likes

Thanks @jbardi Thats probably a very good idea…

I tried:

  check_snizzlenas:
    alias: "Check if snizzleNAS is needed"
    sequence:
      - condition: numeric_state
        entity_id: sensor.snizzleplex
        state:
          above: 0
      - service: switch.turn_off
        entity_id: switch.snizzlenas

But this gives the following error:

6-08-08 13:35:04 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [script]: [condition] is an invalid option for [script]. Check: script->script->check_snizzlenas->sequence->0->condition.

I see, it’s a 2 years old request, but the only Google find to this topic, and I need exactly the same, so I voted.

I use scenes to set values to entity attributes: dim lights to specific brightness, set window shutters to specific value. It would be easier with a simple condition in the scene to NOT set value if already lower, than writing a lot of small script to each entity.