Add daily e-paper quote rotation
This commit is contained in:
@@ -1438,3 +1438,22 @@
|
||||
device_id: 6d1be741876624a70ab5b01b54c6fd6f
|
||||
entity_id: 621e4377a089b7f5d92c7c9f2cc171a1
|
||||
domain: switch
|
||||
|
||||
- id: epaper_daily_demotivational_quote
|
||||
alias: Epaper tägliches Demotivationszitat
|
||||
description: Wählt täglich ein festes Zitat aus der lokalen Zitatbibliothek aus.
|
||||
triggers:
|
||||
- trigger: homeassistant
|
||||
event: start
|
||||
- trigger: time
|
||||
at: "00:00:00"
|
||||
conditions: []
|
||||
actions:
|
||||
- action: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.epaper_demotivationszitat
|
||||
data:
|
||||
option: >-
|
||||
{% set quotes = state_attr('input_select.epaper_demotivationszitat', 'options') %}
|
||||
{{ quotes[(now().strftime('%j') | int - 1) % (quotes | count)] }}
|
||||
mode: single
|
||||
|
||||
Reference in New Issue
Block a user