From 0231ff8f5e5b2c8dd6916aa03ba118a9187fbfc9 Mon Sep 17 00:00:00 2001 From: Daniele Verducci Date: Thu, 9 Apr 2026 11:22:40 +0200 Subject: [PATCH] Better battery low animation --- hexagon.yaml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/hexagon.yaml b/hexagon.yaml index b9d8b99..7e19e45 100644 --- a/hexagon.yaml +++ b/hexagon.yaml @@ -172,6 +172,23 @@ script: blue: !lambda return b; #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 then: - script.execute: @@ -262,15 +279,11 @@ script: then: #- logger.log: "Executing Battery Low script" # Turn lights on red - - light.turn_off: hexagon_sections - - delay: 1s - script.execute: - id: set_section_color - section: 0 + id: set_all_sections_color_animation r: 1.0 g: 0.0 b: 0.0 - - delay: 1s # Play battery low tune - rtttl.play: rtttl: Battery Low:d=8,o=6,b=600:c6,p,c5,p,2c4