Binary Clock
This is a nice Binary clock showing Hours, Minute and Seconds in the Binary format
| System | Home Assistant |
|---|---|
| Firmware | AWTRIX 3 |
| Topic | Smarthome |
| Built by | Justin |
| File | jDKBo93L5n3P.yaml · 2.2 KB |
| Icons | — |
| Published | 27 Dec 2024 |
| Downloads | 4 |
This is a nice Binary clock showing Hours, Minute and Seconds in the Binary format.
This updates every 2 seconds.
Steps:
- Create a new automation
- Add the YML config
- Change the MQTT topic to your Awtrix Clock
jDKBo93L5n3P.yaml
alias: Awtrix Binary Clock
description: ""
triggers:
- trigger: time_pattern
seconds: /2
conditions: []
actions:
- action: mqtt.publish
metadata: {}
data:
evaluate_payload: false
qos: 0
retain: false
payload: |-
{
"draw": [
{ "df": [5, 0, 2, 2, "{% if now().hour // 32 %}#ff0000{% else %}#ffffff{% endif %}" ] },
{ "df": [9, 0, 2, 2, "{% if now().hour // 16 %}#ff0000{% else %}#ffffff{% endif %}" ] },
{ "df": [13, 0, 2, 2, "{% if now().hour // 8 % 2 %}#ff0000{% else %}#ffffff{% endif %}" ] },
{ "df": [17, 0, 2, 2, "{% if now().hour // 4 % 2 %}#ff0000{% else %}#ffffff{% endif %}" ] },
{ "df": [21, 0, 2, 2, "{% if now().hour // 2 % 2 %}#ff0000{% else %}#ffffff{% endif %}" ] },
{ "df": [25, 0, 2, 2, "{% if now().hour % 2 %}#ff0000{% else %}#ffffff{% endif %}" ] },
{ "df": [5, 3, 2, 2, "{% if now().minute // 32 %}#00ff00{% else %}#ffffff{% endif %}" ] },
{ "df": [9, 3, 2, 2, "{% if now().minute // 16 % 2 %}#00ff00{% else %}#ffffff{% endif %}" ] },
{ "df": [13, 3, 2, 2, "{% if now().minute // 8 % 2 %}#00ff00{% else %}#ffffff{% endif %}" ] },
{ "df": [17, 3, 2, 2, "{% if now().minute // 4 % 2 %}#00ff00{% else %}#ffffff{% endif %}" ] },
{ "df": [21, 3, 2, 2, "{% if now().minute // 2 % 2 %}#00ff00{% else %}#ffffff{% endif %}" ] },
{ "df": [25, 3, 2, 2, "{% if now().minute % 2 %}#00ff00{% else %}#ffffff{% endif %}" ] },
{ "df": [5, 6, 2, 2, "{% if now().second // 32 %}#0000ff{% else %}#ffffff{% endif %}" ] },
{ "df": [9, 6, 2, 2, "{% if now().second // 16 % 2 %}#0000ff{% else %}#ffffff{% endif %}" ] },
{ "df": [13, 6, 2, 2, "{% if now().second // 8 % 2 %}#0000ff{% else %}#ffffff{% endif %}" ] },
{ "df": [17, 6, 2, 2, "{% if now().second // 4 % 2 %}#0000ff{% else %}#ffffff{% endif %}" ] },
{ "df": [21, 6, 2, 2, "{% if now().second // 2 % 2 %}#0000ff{% else %}#ffffff{% endif %}" ] },
{ "df": [25, 6, 2, 2, "{% if now().second % 2 %}#0000ff{% else %}#ffffff{% endif %}" ] }
]
}
topic: awtrix_52ec98/custom/binaryclock
mode: single
More flows for Home Assistant or Smarthome
Something wrong with this flow? Report it.