I’m struggling with trying to get the battery level % to show with this icon, and furthermore change colors based on different operators >= 90, <=70, etc. any help with syntax in advance is much appreciated!
type: custom:button-card
entity: sensor.MyBattery_phone_battery_level
name: Battery
show-state: true
show-units: true
styles:
card:
- filter: opacity(50%)
- height: 60px
- width: 115px
icon:
- color: black
state:
- value: 70
- operator: ">="
styles:
card:
- filter: opacity(100%)
icon:
- color: red
state:
- value: 70
- operator: "<="
here’s my result: