Hi, I’m trying to change an icon in the view panel… I have a view named “battery” that shows the level battery of a tablet (sensor works fine)
ui-lovelace.yaml
- title: battery
icon: mdi:battery
id: battery_level
cards:
- type: gauge
title: Livello Tablet
entity: sensor.display_tablet_battery
min: 0
max: 100
severity:
red: 0
yellow: 20
green: 60
configuration.yaml:
customize:
group.battery:
templates:
icon: >
if (entities['sensor.display_tablet_battery'].state < '20') return 'mdi:alert-decagram';
return 'mdi:battery';
But it doesn’t work… any suggestion?
PS: edited, sorry guys…