I have a Apple Watch complication that shows the percentage of a bettery, i want to change the color of the icon or of the ring based on how much power is left in the battery.
![WhatsApp Bild 2023-07-01 um 19.38.01](https://community-assets.home-assistant.io/original/4X/d/5/7/d57595fdca4a370fde581137bea8d175ba0a295a.jpeg)
Is this Possible ?
I have a Apple Watch complication that shows the percentage of a bettery, i want to change the color of the icon or of the ring based on how much power is left in the battery.
Is this Possible ?
Welcome!
I use the rather ratty code to do something similar, perhaps it might give you some ideas. There must be a cleaner way…
- type: "custom:button-card"
entity: sensor.backyard_govee_temperature
icon: mdi:thermometer
show_state: true
state:
- value: 120
operator: '>='
color: DarkRed
- value: 110
operator: '>='
color: Firebrick
- value: 100
operator: '>='
color: Red
- value: 90
operator: '>='
color: OrangeRed
- value: 80
operator: '>='
color: Orange
- value: 75
operator: '>='
color: Yellow
- value: 70
operator: '>='
color: Green
- value: 60
operator: '>='
color: DarkCyan
- value: 50
operator: '>='
color: Cyan
- value: 40
operator: '>='
color: DeepSkyBlue
- value: 30
operator: '>='
color: Blue
- value: 20
operator: '>='
color: BlueViolet
- value: 10
operator: '>='
color: Purple
- value:
operater: default
color: Black
so is this possible to display on apple watch ?
Apologizes, I missed the ‘on the watch’ goal. That I have not tried. Good hunting!
alright, i try if i get it to work