Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scene automation: restore snapshot: using transition fails #117604

Open
systemcrash opened this issue May 17, 2024 · 2 comments
Open

Scene automation: restore snapshot: using transition fails #117604

systemcrash opened this issue May 17, 2024 · 2 comments

Comments

@systemcrash
Copy link
Contributor

systemcrash commented May 17, 2024

The problem

(For a light)
If I restore a snapshot after an automation with zero transition time: OK.
If I restore a snapshot after an automation with > 0 transition time: NOK.

The light sometimes makes it a few percent of the way and then stops. Lovelace control thinks the light made it all the way.

Textbook automation case from: https://www.home-assistant.io/integrations/scene

What version of Home Assistant Core has the issue?

core-2024.5.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ZHA

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

OK:

alias: Hall light to on then return to previous state
description: ""
trigger:
  - device_id: c13d2468cc5cd290a3c650c4cbc43011
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition: []
action:
  - service: scene.create
    metadata: {}
    data:
      snapshot_entities:
        - light.dresden_elektronik_raspbee_ii_hall_ceiling
      scene_id: hall_snapshot
  - service: light.turn_on
    metadata: {}
    data:
      transition: 1
      brightness_pct: 100
    target:
      entity_id: light.dresden_elektronik_raspbee_ii_hall_ceiling
  - delay:
      hours: 0
      minutes: 0
      seconds: 6
      milliseconds: 0
  - service: scene.turn_on
    target:
      entity_id: scene.hall_snapshot
    data: {}
mode: single

Bad (just add data: transition: 1):

alias: Hall light to on then return to previous state
description: ""
trigger:
  - device_id: c13d2468cc5cd290a3c650c4cbc43011
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition: []
action:
  - service: scene.create
    metadata: {}
    data:
      snapshot_entities:
        - light.dresden_elektronik_raspbee_ii_hall_ceiling
      scene_id: hall_snapshot
  - service: light.turn_on
    metadata: {}
    data:
      transition: 1
      brightness_pct: 100
    target:
      entity_id: light.dresden_elektronik_raspbee_ii_hall_ceiling
  - delay:
      hours: 0
      minutes: 0
      seconds: 6
      milliseconds: 0
  - service: scene.turn_on
    target:
      entity_id: scene.hall_snapshot
    data:
      transition: 1
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

Tried using lights as individual devices, and as a zigbee cluster entity (all lights+controller grouped), and the result is the same.

If the light was OFF at snapshot, using transition: light transitions completely and correctly to snapshot state.
If the light was ON (at e.g. 15% brightness) at snapshot, using transition FAILS.

@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (scene) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of scene can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign scene Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


scene documentation
scene source
(message by IssueLinks)

@systemcrash
Copy link
Contributor Author

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant