Closed TedTolboom closed 6 years ago
The flow in questions looks like this:
The variable is a "Better logic variable" set to 10 or 99 depending on the time of day.
I hope it helps. :) The flow must have been running quite a few times before crashing. (Every 3 seconds)
@lurendrejer just for my understanding; why do you resend the command every 3 seconds?
Alternative solution could be to set it once, with infinite cycles (=255, see hint of the action card)... and once the condition changes, stop the Led flash...
The card shouldn't crash, under any circumstances, I will add a solution for that issue...
Hi. I want the led to alternate every 1,5 if the light is on. I have to run the check anyways, so I just use it for blinking the light. 1,5 secs on/1,5 secs off. If all lights are off, i the led turns off within one cycle.
When the kids turn of their lights and walk to the door, the led should already show the correct status, which three seconds is perfect for.
My first solution involved adding and subtracting from a variable, and blinking the lights multiple times when It changed(if != 0). But it was tedious to maintain and when the zhc status updates broke, I had to do something else. This didn't solve the last problem, but it became my solution of choice. That is until the zhc supports pulsing LEDs or I get that goddamn homeyscript working :)
And, I can't use 'if any light' conditions. Since the zhc controls my water heater, garagedoor and other appliances via scene notifications. I cant count on them being off. And the device type 'light' is hsrdcoded in the app.
If I set the parameter to use basic set for LEDs, the virtual switches could be forced. But I'd loose the indicators set command class features.
/Sent from the phone.
solved in previous app update...
A crash occurred for your app (version 1.0.1) at Sep 12, 2017 5:52 PM (UTC).
Homey software version: 1.5.2 Crash report: TypeError: Cannot read property 'instance' of undefined at Object.Homey.manager.on (/drivers/zhc5010/driver.js:218:13) at emitThree (events.js:135:13) at Object.emit (events.js:216:7) at /manager/flow.js:1:315 at /helpers/client.js:1:1040 at Array.forEach ()
at process. (/helpers/client.js:1:1009)
at emitTwo (events.js:125:13)
at process.emit (events.js:213:7)
at emit (internal/child_process.js:774:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)