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

Stacked set not updating device state #668

Open
JonHamilton opened this issue Feb 9, 2017 · 1 comment
Open

Stacked set not updating device state #668

JonHamilton opened this issue Feb 9, 2017 · 1 comment

Comments

@JonHamilton
Copy link

I'm running 4.1; checked master and didn't see any changes which looked relevant to this issue.

I have a "countdown timer" working so that if so configured, my devices will shut off after the configured duration. Next I was looking to implement a "hey, I'm going to shut off soon" warning similar to what is found on digital countdown timers (where it flashes the light off for a second, then back on for a minute, then off for good).

I tried doing this with a stacked set command, and it does cycle through the device settings as expected -- but it doesn't update the ->state at any point, so to my code it looks like the device is always just "on" even though it is transitioning state a few times. Am I misunderstanding or missing something?

$unit->set("OFF2ON60OFF", "countdown_timer");

This does trigger an event as I'd expect, but in my tie_event code, if I check the state, it always says that it's on.

Thanks for any pointers.

@JonHamilton
Copy link
Author

I found the problem, and it's me :) Quoted the string and left ON and OFF uppercase in the quoted string, so the state updates didn't behave right. Lowercase worked fine/triggers the $state updates as expected.

I'm not sure - this still seems like it should be updating state and/or the behavior when handed an uppercase value should be consistent between the internally represented $state and the behavior of the system - but at least it makes sense and has a sane workaround. If this is expected behavior, please feel free to close as such.

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

No branches or pull requests

1 participant