Scene.create not work anymore

Hi All,

It was working but seem after latest or update before latest of HA the scene.create it not working.

I used this part in a automation. The scene.doorbell is created but not work.
the variable “motion_bathroom” is defi

    - service: "{{ 'scene.create' if is_state('binary_sensor.bathroom_detection', 'on') else 'script.none' }}"
      data:
        scene_id: doorbell
        snapshot_entities:
          - light.bathroom_all

    - service: "{{ 'light.turn_on' if is_state('binary_sensor.bathroom_detection', 'on') else 'script.none' }}"
      data:
        entity_id: light.bathroom_all
        color_name: "blue"

    - delay: "00:00:03"

    - service: "{{ 'scene.turn_on' if is_state('binary_sensor.bathroom_detection, 'on') else 'script.none' }}"
      data: 
      target:
        entity_id: scene.doorbell

Home Assistant OS 7.5
supervisor-2022.03.5
core-2022.3.7

Why are you templating each service? Just add a choose condition with a sequence and you won’t need template.

As for your scene, home assistant thinks it’s working. So I’d look at the hardware on light.bathroom_all

Try this version:

    - choose:
      - conditions: "{{ is_state('binary_sensor.bathroom_detection', 'on') }}"
        sequence:
          - service: scene.create
            data:
              scene_id: doorbell
              snapshot_entities:
                - light.bathroom_all
          - service: light.turn_on
            target:
              entity_id: light.bathroom_all
            data:
              color_name: "blue"
          - delay: "00:00:03"
          - service: scene.turn_on
            target:
              entity_id: scene.doorbell
      default: []

… and petro beat me to the post while I was laboriously typing this on mobile …

its weird as … Tried different lights they work correct with the automation. When switch back to the bathroom the first part is working. change back to old snapshot conditions nothing happen.

But the automation work with other lights without problem.

The bathroom lights work great with other automations… turn on with motion. Work with Alexa and Siri, change colors etc…

Can’t find a automation or something that conflict with this one…

snapshot the single lights, not the light group

This light is 1 light. Milight bulbs all paired in 1 group and that group is 1 light in HA.
Its not a group light in HA…

ill thougt its more than one light :smiley:

I give the group of Milight hun this name haha :slight_smile:

After restart of HA sometimes it does work sometimes it does’t work. Thats end conclusion… :frowning:

changed some things to the milight hub. Then there is a totally different response. Not how it must work.
There is something going on with the JSON that has been send by the Milight Hub and how Home assistant reads the JSON.

I just gained a whole new level of respect for you. I can’t even type a text message without my fumble fingers creating barely recognizable English. Trying to type code, especially YAML on mobile would certainly send me over the edge :rofl: