Countdown Timer
Home Assistant

Countdown Timer

A Countdown Timer for Awtrix Light
A flow by Hank_the_Tank

Flow Details

AWTRIX

Things you have to do: Create a Timer helper in HA (Settings> Devices&Services> Helpers> +Create Helper> Timer) give it a name "awtrix timer" and set your desired duration. Download The Lametric icon ID 42893 to your Awtrix. Copy short.txt file to your /MELODIES folder of your Awtrix. Content of short.txt file "two short:d=4,o=5,b=100:16e6,16e6" (without the quotes) Change topic: awtrix_xxxxxx

Special Thanks to TheFes for the Payload

alias: ⏳AWTRIX Timer description: "" trigger: - platform: state entity_id: - timer.awtrix_timer to: active id: start - platform: state entity_id: - timer.awtrix_timer to: idle id: stop condition: [] action: - choose: - conditions: - condition: trigger id: - start sequence: - parallel: - repeat: sequence: - service: mqtt.publish data: qos: 0 retain: false topic: awtrix_a8ba90/custom/timer payload: > {% set duration = as_timedelta(state_attr('timer.awtrix_timer', 'duration')).total_seconds() %} {% set remaining = as_datetime(state_attr(trigger.entity_id, 'finishes_at')) - now().replace(microsecond=0) %} {% set passed = duration - remaining.total_seconds() %} {% set progress = ((passed/duration) * 100) | round(0) | int %} {{ dict( icon = '42893', text = remaining | string, progress = progress, progressC = '#ff0000', progressBC = '#000000' ) }} - delay: hours: 0 minutes: 0 seconds: 1 milliseconds: 0 while: - condition: state entity_id: timer.awtrix_timer state: active - service: mqtt.publish data: qos: 0 retain: false topic: awtrix_a8ba90/settings payload: "{\"ATRANS\": false}" - repeat: count: 1 sequence: - service: mqtt.publish data: qos: 0 retain: false topic: awtrix_a8ba90/switch payload: "{\"name\":\"timer\"}" - conditions: - condition: trigger id: - stop sequence: - service: mqtt.publish data: qos: 0 retain: false topic: awtrix_a8ba90/sound payload: "{\"sound\":\"short\"}" - delay: hours: 0 minutes: 0 seconds: 1 milliseconds: 0 - parallel: - service: mqtt.publish data: qos: 0 retain: false topic: awtrix_a8ba90/custom/timer - service: mqtt.publish data: qos: 0 retain: false topic: awtrix_a8ba90/settings payload: "{\"ATRANS\": true}" mode: restart
-- Flow first published on November 9, 2023, last updated on November 10, 2023 at 07:46.