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

Story: Light setter #15

Open
Yoric opened this issue Feb 12, 2016 · 0 comments
Open

Story: Light setter #15

Yoric opened this issue Feb 12, 2016 · 0 comments

Comments

@Yoric
Copy link
Collaborator

Yoric commented Feb 12, 2016

Meta-bug: #2

When the motion detector hasn't seen any movement in 10 minutes,
turn off the lignts.

Can be expressed as

I need:
- `motion detectors` (at least one) with property `is there motion`;
- `lights` (at least one) to `turn off`;
- `10 minutes countdown` to `start`, `stop`, with property `is done`.

1. When `is there motion` of `motion detector` switches to false
do `start` with `10 minutes countdown`;
2. When `is there motion` of `motion detector` switches to true
do `stop` with `10 minutes countdown`;
3. When `is done` of `10 minutes countdown` switches to true
do `turn off` with `lights`.

Note that this does not require any explicit state.

Input devices

  • motion detector, with property is there motion;
  • 10 minutes countdown, built-in, with property is done.

Output devices

  • lights, with capability turn off;
  • 10 minutes countdown (the same one), with capabilities start, stop

Note that applications are sandboxed, so the 10 minutes countdown is
not visible by other applications.

Values

Nothing new here.

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

No branches or pull requests

1 participant