Replace deprecated sensor.hacs with new template sensor hacs_opdateringer

This commit is contained in:
2026-04-09 17:04:22 +02:00
parent eebdd02c0d
commit 2918b73d3e
2 changed files with 18 additions and 5 deletions
+3 -3
View File
@@ -89,7 +89,7 @@ sections:
state: "on"
card:
type: tile
entity: sensor.hacs
entity: sensor.hacs_opdateringer
name: HACS opdateringer
- type: conditional
@@ -98,11 +98,11 @@ sections:
entity: input_boolean.vis_alle_vedligehold
state: "off"
- condition: numeric_state
entity: sensor.hacs
entity: sensor.hacs_opdateringer
above: 0
card:
type: tile
entity: sensor.hacs
entity: sensor.hacs_opdateringer
name: HACS opdateringer
- type: grid
+15 -2
View File
@@ -77,7 +77,7 @@
{{
is_state('binary_sensor.home_assistant_website_update_available', 'on')
or is_state('update.hacs_update', 'on')
or states('sensor.hacs') | int(0) > 0
or states('sensor.hacs_opdateringer') | int(0) > 0
}}
- name: Vedligehold affald
@@ -130,6 +130,19 @@
{{ states('sensor.dethlefsen_drive_4_status') | lower not in ['normal', 'unknown', 'unavailable', 'none'] }}
- sensor:
- name: HACS opdateringer
unique_id: hacs_pending_updates
unit_of_measurement: opdateringer
icon: mdi:package-variant
state: >-
{{
integration_entities('hacs')
| select('search', '^update\.')
| map('states')
| select('eq', 'on')
| list | count
}}
- name: Antal vedligeholdskort
unique_id: maintenance_cards_count
unit_of_measurement: kort
@@ -139,7 +152,7 @@
[
1 if is_state('binary_sensor.home_assistant_website_update_available', 'on') else 0,
1 if is_state('update.hacs_update', 'on') else 0,
1 if states('sensor.hacs') | int(0) > 0 else 0,
1 if states('sensor.hacs_opdateringer') | int(0) > 0 else 0,
1 if is_state('binary_sensor.dethlefsen_security_status', 'on') else 0,
1 if is_state('update.dethlefsen_dsm_update', 'on') else 0,
1 if is_state('binary_sensor.vedligehold_synology_disk_1_status', 'on') else 0,