Skip to content

Commit

Permalink
Update rabbit-hutch.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
crjeder authored Oct 17, 2024
1 parent 6e2315b commit 93b33be
Showing 1 changed file with 20 additions and 30 deletions.
50 changes: 20 additions & 30 deletions rabbit-hutch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,36 +85,30 @@ state_machine:
- name: MANUAL_CLOSE
transitions:
- ERROR -> CLOSED
- on_transition:
- number.set:
id: nr_inhabitants
value: !lambda |-
return id(nr_rabits).state;
- cover.close: huch_door
- OPEN -> CLOSED
- on_transition:
- number.set:
id: nr_inhabitants
value: !lambda |-
return id(nr_rabits).state;
- cover.close: huch_door
on_input:
- number.set:
id: nr_inhabitants
value: !lambda |-
return id(nr_rabits).state;
- cover.close: huch_door
- name: TIME_CLOSE
transitions:
- OPEN -> WAITING
- name: TIME_OPEN
transitions:
- CLOSED -> OPEN
- on_transition:
- cover.open: hutch_door
on_input:
- cover.open: hutch_door
- name: ENTER
transitions:
- OPEN -> OPEN
- on_transition:
on_transition:
- number.increment:
id: nr_inhabitants
cycle: false
- WAITING -> WAITING
- on_transition:
on_transition:
- number.increment:
id: nr_inhabitants
cycle: false
Expand All @@ -126,24 +120,20 @@ state_machine:
- name: CLOSE
transitions:
- WAITING -> CLOSED
- on_transition:
- number.set:
id: nr_inhabitants
value: !lambda |-
return id(nr_rabits).state;
- cover.close: huch_door
on_input:
- number.set:
id: nr_inhabitants
value: !lambda |-
return id(nr_rabits).state;
- cover.close: huch_door
- name: EXIT
transitions:
- OPEN -> OPEN
- on_transition:
- number.decrement:
id: inhabitants
cycle: false
- WAITING -> WAITING
- on_transition:
- number.decrement:
id: inhabitants
cycle: false
on_imput:
- number.decrement:
id: inhabitants
cycle: false

switch:
- platform: gpio
Expand Down

0 comments on commit 93b33be

Please sign in to comment.