In a more pedantic implementation there would be a closing state before a closed state for this exact purpose.
but before you throw in the towel, one thing you might try is to go to full open then to full close( maximize the amount of time closing) then look in the Dev tools states to see if there are any intermediary states you can key off of while it is traveling…
That state should be coming from zwave only. Now I would not be surprised if the device sends a closed right after the command. Then sends a closing. I’ve seen similar behavior with a fan switch which in the early days of zwavejs was causing issues, but they sorted it out. Turn on debug logging for zwavejsui, run the test and we should be able to see the sequence.
If you want to force a value read, use zwave_js.refresh_value. This call does not block until the refresh, so a delay of 200ms after may be neccesary. But this may give you a more accurate view of the value before going into the wait template.
I’m assuming the whole point of the automation is to get notified when the cover fails to close as instructed?
thank you. yes i already figured that. it never gets any other state than open or closed. even attributes like current_position are changed immediately after a service call and then adjusted as the cover travels.
Thanks i will give that a shot. In the meantime i found a way (some ppl recommended this here in the forum) that works as expected by using a wait_for_trigger like this:
This works exactly as it should in any situation. But (big BUT) it uses the device platform which for various reasons is not what i want/should do (as pointed out further above). i am unsure how to translate (if even possible) this to the state or any other platform. But i am not giving up yet.
Yeah maybe i should have said from the beginning what i am aiming for. So, this script is actually just for testing (hence the alias). What i am trying to achieve is to move a Cover to a certain position (e.g. close it) and then tilt it by using cover.set_cover_tilt_position.