Hi team!
I am running a C-7 with FW version 2.3.8.140.
In order to come back from Hub Mode "Away" to the right Hub Mode based on the hour of the day, I have created a virtual button that, when pushed, instructs the Mode Manager App to do just that:
When Hub Mode is Away and I push on this virtual button on its device webpage, Hub Mode changes to the right setting based on the hour of the day.
When I try to automate this in webcore, I built a simple piston that does not work:
Please note the error message:
Command optimization: Skipped execution of device command [Button return from away].push(1) because it would make no change to the device. (1ms)
When I disable command optimizations in the piston, the execution is as expected:
Is this the intended behavior or a bug?
To me, although somewhat unintuitive, it is working as intended.
Interesting! I would like to know how you justify your opinion...
From a programing stand point I believe the backend of this push button request, when optimizations are enabled, checks the virtual button -> current state -> pushed variable, which is already '1' from a previous push button request, and then decides that the action is not worth executing because the state is already pushed. In other words, a previous push action prevents this from executing, which clearly is not a proper behavior.
It would be great if the project maintainers could confirm my assumption above and confirm this is the intended behavior.
Sorry for the delay, I will need to look at this more.
I expect the command for push is not marked as momentary device.