From d25b6ccb6caf141b67f66d1321c6ec19824c0478 Mon Sep 17 00:00:00 2001 From: Daniele Verducci Date: Thu, 9 Apr 2026 10:56:29 +0200 Subject: [PATCH] Fixed battery low management --- hexagon.yaml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hexagon.yaml b/hexagon.yaml index 5f61dcf..23d03a6 100644 --- a/hexagon.yaml +++ b/hexagon.yaml @@ -15,6 +15,7 @@ esphome: - priority: -100 # When all is set up. Start the show. then: + - delay: 5s - script.execute: game_ready_animation # Variables @@ -231,9 +232,9 @@ script: r: !lambda if (id(game_selected_section) < 3) return 0.0; else return 1.0; g: !lambda if (id(game_selected_section) == 0 || id(game_selected_section) == 3 || id(game_selected_section) == 4) return 0.0; else return 1.0; b: !lambda if (id(game_selected_section) % 2 == 0) return 1.0; else return 0.0; - - logger.log: - format: "Selected section %d" - args: [ 'id(game_selected_section)' ] + #- logger.log: + # format: "Selected section %d" + # args: [ 'id(game_selected_section)' ] - id: game_play_section then: - rtttl.play: @@ -255,14 +256,16 @@ script: } - id: battery_low then: - - logger.log: "Executing Battery Low script" - # Turn lughts on red - - light.turn_on: - id: hexagon_sections - brightness: 100% - red: 100% - green: 0% - blue: 0% + #- 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 + r: 1.0 + g: 0.0 + b: 0.0 - delay: 1s # Play battery low tune - rtttl.play: