Created
July 2, 2023 14:19
-
-
Save TheRealSimon42/1545fbbcef4223ac8aa503188f11490f to your computer and use it in GitHub Desktop.
Code-Snippet für Template-Sensor zur Berechnung eines Timestamps aus input Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template: | |
- sensor: | |
- name: WakeUp Light Timestamp | |
device_class: timestamp | |
state: > | |
{% if is_state("binary_sensor.workday_sensor", "on") %} | |
{{ today_at(states('input_datetime.aufwachzeit_arbeitstag')) }} | |
{% elif is_state("binary_sensor.workday_sensor", "off") %} | |
{{ today_at(states('input_datetime.aufwachzeit_freizeit')) }} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment