Automation for day_mod: use an image instead of sensor text.
ha automation
alias: Automatic day_mod selector
description: Switch input_select.day_mod based on time of day
triggers:
- trigger: time
at: "06:30:00"
- trigger: time
at: "10:00:00"
- trigger: time
at: "18:30:00"
- trigger: time
at: "21:30:00"
- trigger: homeassistant
event: start
actions:
- choose:
- conditions:
- condition: time
after: "06:30:00"
before: "10:00:00"
sequence:
- action: input_select.select_option
target:
entity_id: input_select.day_mod
data:
option: "π
"
- conditions:
- condition: time
after: "10:00:00"
before: "18:30:00"
sequence:
- action: input_select.select_option
target:
entity_id: input_select.day_mod
data:
option: "βοΈ"
- conditions:
- condition: time
after: "18:30:00"
before: "21:30:00"
sequence:
- action: input_select.select_option
target:
entity_id: input_select.day_mod
data:
option: "π"
default:
- action: input_select.select_option
target:
entity_id: input_select.day_mod
data:
option: "π"
mode: single
config.yaml
input_select:
day_mod:
name: Day mod
options:
- "π
" # morning
- "βοΈ" # day
- "π" # evening
- "π" # night
dashboard widget
day_mode:
widget_type: sensor
entity: input_select.day_mod
text_style: "color: #44d2a4 !important; font-weight: bold; font-size: 360%;"
