Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor:
- - platform: template
- sensors:
- time_to_event:
- value_template: >
- {%- if state_attr('calendar.familijne', 'start_time') == None -%}
- Brak wydarzeń
- {%- else -%}
- {%- set t = ((state_attr('calendar.familijne', 'start_time') | as_timestamp - now() | as_timestamp)/3600) | int -%}
- {{ (t/24) | round(method='floor') }} dni, {{ t % 24}} godzin
- {%- endif -%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement