Moved sunrise/set calculation to HA via template sensor. Get rid of that (non-working) dirty workaround.
This commit is contained in:
29
sensors.yaml
29
sensors.yaml
@@ -2,6 +2,7 @@
|
||||
- platform: time_date
|
||||
display_options:
|
||||
- 'time'
|
||||
- 'date'
|
||||
# Raspberry Pi CPU temp
|
||||
- platform: command_line
|
||||
name: "CPU Temp"
|
||||
@@ -37,17 +38,17 @@
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
internet_speed_in:
|
||||
friendly_name: 'Internet Speed IN'
|
||||
value_template: '{{ ((states.input_number.internet_traffic_delta_in.state | float ) / 1000000 ) | round(2) }}'
|
||||
unit_of_measurement: 'Mbps'
|
||||
internet_speed_in:
|
||||
friendly_name: 'Internet Speed IN'
|
||||
value_template: '{{ ((states.input_number.internet_traffic_delta_in.state | float ) / 1000000 ) | round(2) }}'
|
||||
unit_of_measurement: 'Mbps'
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
internet_speed_out:
|
||||
friendly_name: 'Internet Speed OUT'
|
||||
value_template: '{{ ((states.input_number.internet_traffic_delta_out.state | float ) / 1000000 ) | round(2) }}'
|
||||
unit_of_measurement: 'Mbps'
|
||||
internet_speed_out:
|
||||
friendly_name: 'Internet Speed OUT'
|
||||
value_template: '{{ ((states.input_number.internet_traffic_delta_out.state | float ) / 1000000 ) | round(2) }}'
|
||||
unit_of_measurement: 'Mbps'
|
||||
|
||||
- platform: statistics
|
||||
name: 'WAN Traffic In'
|
||||
@@ -56,3 +57,15 @@
|
||||
- platform: statistics
|
||||
name: 'WAN Traffic Out'
|
||||
entity_id: sensor.internet_speed_out
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
sun_rising_template:
|
||||
friendly_name: "Sun Rising Template"
|
||||
value_template: "{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom ('%H:%M') }}"
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
sun_setting_template:
|
||||
friendly_name: "Sun Setting Template"
|
||||
value_template: "{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom ('%H:%M') }}"
|
||||
|
Reference in New Issue
Block a user