Skip to content

Commit

Permalink
fixup! Migrate batteries group to newer platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-V committed Aug 20, 2024
1 parent bc4670a commit a6cfc54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dashboards/cards/batteries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ entities:
filter:
template: >
{% set rows = namespace(low = [], others = []) %}
{%- for entity in expand('group.all_batteries') %}
{%- for entity in expand('sensor.all_batteries') %}
{% set level = entity.state | int(None) %}
{% set battery_type = entity.attributes.battery_type | default %}
{% set warning_level = entity.attributes.battery_warning_level | default | int(25) %}
Expand Down Expand Up @@ -63,7 +63,7 @@ entities:
filter:
template: >
{% set rows = namespace(low = [], others = []) %}
{%- for entity in expand('group.all_batteries') %}
{%- for entity in expand('sensor.all_batteries') %}
{% set level = entity.state | int(None) %}
{% set battery_type = entity.attributes.battery_type | default %}
{% set warning_level = entity.attributes.battery_warning_level | default | int(25) %}
Expand Down
2 changes: 1 addition & 1 deletion packages/aggregates/batteries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ template:
entity_id: >-
{% set ns = namespace(entities = []) %}
{% for entity in expand('group.all_batteries') %}
{% for entity in expand('sensor.all_batteries') %}
{% set state = entity.state | int(0) %}
{% set warning_level = state_attr(entity.entity_id, 'battery_warning_level') | int(25) %}
{% if state <= warning_level %}
Expand Down

0 comments on commit a6cfc54

Please sign in to comment.