initial commit
This commit is contained in:
19
configuration/sensor/template_sun_state.yaml
Normal file
19
configuration/sensor/template_sun_state.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
- platform: template
|
||||
sensors:
|
||||
sunset_time:
|
||||
value_template: '{% set timestamp = as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom("%I:%M") %} {{ timestamp.lstrip("0") }}'
|
||||
friendly_name: 'Sunset'
|
||||
|
||||
sunrise_time:
|
||||
value_template: '{% set timestamp = as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom("%I:%M") %} {{ timestamp.lstrip("0") }}'
|
||||
friendly_name: 'Sunrise'
|
||||
|
||||
sun_state:
|
||||
friendly_name: 'Sun State'
|
||||
value_template: '{{ states.sun.sun.state }}'
|
||||
|
||||
sun_elevation:
|
||||
friendly_name: 'Sun Elevation'
|
||||
value_template: '{{ states.sun.sun.attributes.elevation }}'
|
||||
unit_of_measurement: 'degrees'
|
Reference in New Issue
Block a user