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

Add artificially delay before turning off a scene switch #1170

Closed
maxileith opened this issue Oct 2, 2023 · 2 comments
Closed

Add artificially delay before turning off a scene switch #1170

maxileith opened this issue Oct 2, 2023 · 2 comments
Labels

Comments

@maxileith
Copy link

maxileith commented Oct 2, 2023

Issue

When using the scene switches as a trigger for automations, the automations are not triggered reliably. I have observed this issue now quiet some time and it looks like the automations are triggered correctly when the scene switch is turned on like for >2 seconds. However, most of the time the scene switches are turned off almost immediately. I would like to see a configuration option to add an artificially delay for the scene switch to turn off.

Log Messages

Debug Files

@ebaauw
Copy link
Owner

ebaauw commented Oct 2, 2023

The time to wait before resetting the “switch” is already configurable through resetTimeout. Default is 500ms, it can be set between 10 and 2000ms. Looks like this setting is missing from the UI Settings form and from the Wiki page, but you should be able to add it manually to config.json.

Note that recalling a scene is write-only, very much like Identify. Unfortunately, I haven’t been able to find a way to make a HomeKit app display a push button, hence the trick to display it as self-resetting switch. I use a similar trick for Brightness Change. These self-resetting characteristics are really meant to be write-only, and probably shouldn’t be used as triggers for HomeKit automations. Depending on your use case, best use a HomeKit scene, combining the automation actions and the switch for the Zigbee scene, or create a CLIPGenericFlag sensor and expose that as dummy switch to base your automation on.

ebaauw added a commit that referenced this issue Oct 2, 2023
Big fix: `resetTimeout` missing, see #1170.
@maxileith
Copy link
Author

Thank you for the quick response. I was not aware of the resetTimeout in the configuration. The hint was the solution for me. Write-only is no problem for my use-case since I trigger the zigbee scenes always with the switches anyway. So there is no need to detect when I change scenes from another source, e.g. the Hue app because I don't use any other service to control the light.

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

No branches or pull requests

2 participants