mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
template:
|
||||
- trigger:
|
||||
- platform: time
|
||||
at: '00:00:00'
|
||||
- platform: event
|
||||
event_type: event_template_reloaded
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
sensor:
|
||||
- name: 'Two Hours Before Sunrise'
|
||||
unique_id: 'sensor_two_hours_before_sunrise'
|
||||
state: "{{ state_attr('sun.sun', 'next_rising') | as_datetime - timedelta(hours = 2) }}"
|
||||
device_class: timestamp
|
||||
- name: Sunrise
|
||||
unique_id: sensor_sunrise
|
||||
state: "{{ state_attr('sun.sun', 'next_rising') }}"
|
||||
device_class: timestamp
|
||||
- name: 'Two Hours After Sunrise'
|
||||
unique_id: 'sensor_two_hours_after_sunrise'
|
||||
state: "{{ state_attr('sun.sun', 'next_rising') | as_datetime + timedelta(hours = 2) }}"
|
||||
device_class: timestamp
|
||||
|
||||
- name: 'Two Hours Before Sunset'
|
||||
unique_id: 'sensor_two_hours_before_sunset'
|
||||
state: "{{ state_attr('sun.sun', 'next_setting') | as_datetime - timedelta(hours = 2) }}"
|
||||
device_class: timestamp
|
||||
- name: Sunset
|
||||
unique_id: sensor_sunset
|
||||
state: "{{ state_attr('sun.sun', 'next_setting') }}"
|
||||
device_class: timestamp
|
||||
- name: 'Two Hours After Sunset'
|
||||
unique_id: 'sensor_two_hours_after_sunset'
|
||||
state: "{{ state_attr('sun.sun', 'next_setting') | as_datetime + timedelta(hours = 2) }}"
|
||||
device_class: timestamp
|
||||
Reference in New Issue
Block a user