Migrated deprecated template sensors to modern way.

This commit is contained in:
2025-12-04 08:47:45 +01:00
parent 247c96df5d
commit 3d5693ceaa
2 changed files with 10 additions and 14 deletions

View File

@@ -46,20 +46,6 @@
entity_id: sensor.internet_speed_out entity_id: sensor.internet_speed_out
sampling_size: 10 sampling_size: 10
- platform: template
sensors:
sun_rising_template:
friendly_name: "Sun Rising Template"
unique_id: '0680294616247'
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"
unique_id: '8298170865533'
value_template: "{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom ('%H:%M') }}"
# Sensor for Riemann sum of energy import (W -> Wh) # Sensor for Riemann sum of energy import (W -> Wh)
- platform: integration - platform: integration
source: sensor.power_import source: sensor.power_import

View File

@@ -39,6 +39,16 @@
data: data:
value: "{{ option }}" value: "{{ option }}"
- sensor: - sensor:
- unique_id: 0680294616247
default_entity_id: sensor.sun_rising_template
name: Sun Rising Template
state: '{{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom
(''%H:%M'') }}'
- unique_id: '8298170865533'
default_entity_id: sensor.sun_setting_template
name: Sun Setting Template
state: '{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom
(''%H:%M'') }}'
- name: "power_other" - name: "power_other"
unique_id: '5579422933393' unique_id: '5579422933393'
unit_of_measurement: "W" unit_of_measurement: "W"