Implementing a countdown as a device looks tricky, as this means:
instantiating a new Channel<Getter> for each consumer, to avoid collisions on the same countdown;
deciding when to release this channel.
Moreover, the effort looks unnecessary, as we do not have other kinds of devices that support such situation yet.
One way to implement this would be to make countdowns specific to Thinkerbell, e.g. by adding an optional field since to conditions. With this argument, a trigger is executed only if the conditions remain true for the entire duration.
Side-benefit: this may be useful for sensors that are a bit too sensitive.
Implementing a countdown as a device looks tricky, as this means:
Channel<Getter>
for each consumer, to avoid collisions on the same countdown;Moreover, the effort looks unnecessary, as we do not have other kinds of devices that support such situation yet.
One way to implement this would be to make countdowns specific to Thinkerbell, e.g. by adding an optional field
since
to conditions. With this argument, a trigger is executed only if the conditions remain true for the entire duration.Side-benefit: this may be useful for sensors that are a bit too sensitive.
Blocks