Better battery low animation
This commit is contained in:
23
hexagon.yaml
23
hexagon.yaml
@@ -172,6 +172,23 @@ script:
|
|||||||
blue: !lambda return b;
|
blue: !lambda return b;
|
||||||
#transition_length: 1s;
|
#transition_length: 1s;
|
||||||
|
|
||||||
|
- id: set_all_sections_color_animation
|
||||||
|
parameters:
|
||||||
|
r: float
|
||||||
|
g: float
|
||||||
|
b: float
|
||||||
|
then:
|
||||||
|
- repeat:
|
||||||
|
count: 6
|
||||||
|
then:
|
||||||
|
- script.execute:
|
||||||
|
id: set_section_color
|
||||||
|
section: !lambda return iteration;
|
||||||
|
r: !lambda return r;
|
||||||
|
g: !lambda return g;
|
||||||
|
b: !lambda return b;
|
||||||
|
- delay: 200ms
|
||||||
|
|
||||||
- id: game_ready_animation
|
- id: game_ready_animation
|
||||||
then:
|
then:
|
||||||
- script.execute:
|
- script.execute:
|
||||||
@@ -262,15 +279,11 @@ script:
|
|||||||
then:
|
then:
|
||||||
#- logger.log: "Executing Battery Low script"
|
#- logger.log: "Executing Battery Low script"
|
||||||
# Turn lights on red
|
# Turn lights on red
|
||||||
- light.turn_off: hexagon_sections
|
|
||||||
- delay: 1s
|
|
||||||
- script.execute:
|
- script.execute:
|
||||||
id: set_section_color
|
id: set_all_sections_color_animation
|
||||||
section: 0
|
|
||||||
r: 1.0
|
r: 1.0
|
||||||
g: 0.0
|
g: 0.0
|
||||||
b: 0.0
|
b: 0.0
|
||||||
- delay: 1s
|
|
||||||
# Play battery low tune
|
# Play battery low tune
|
||||||
- rtttl.play:
|
- rtttl.play:
|
||||||
rtttl: Battery Low:d=8,o=6,b=600:c6,p,c5,p,2c4
|
rtttl: Battery Low:d=8,o=6,b=600:c6,p,c5,p,2c4
|
||||||
|
|||||||
Reference in New Issue
Block a user