rajan
(Raivo Kask)
1
I have interfaced APC SmartUPS and got this:
type: entities
entities:
- entity: sensor.ups_system_identifier
name: System identifier
- sensor.ups_status
- entity: sensor.ups_input_voltage
name: Input Voltage
- entity: sensor.ups_load
name: Load
- entity: sensor.ups_output_voltage
name: Output Voltage
- entity: sensor.ups_status_data
name: Status Data
title: UPS Status
state_color: false
theme: Dark-Gray
How can I change ‘sensor.ups_status_data’ to color ‘red’ when its value goes from OL → BL
rajan
(Raivo Kask)
3
Thanks … it worked.
type: entities
entities:
- entity: sensor.ups_system_identifier
card_mod:
style: |
:host {
color: yellow;
}
name: System identifier
- sensor.ups_status
- entity: sensor.ups_input_voltage
name: Input Voltage
- entity: sensor.ups_load
name: Load
- entity: sensor.ups_output_voltage
name: Output Voltage
- entity: sensor.ups_status_data
card_mod:
style: |
:host {
color: red;
}
name: Status Data
title: UPS Status
state_color: false
theme: Dark-Gray
Still I haven’t figured out how to set condition for color change …
Take a look at the construction of this post: 🔹 Card-mod - Add css styles to any lovelace card - #3000 by Ildar_Gabdullin. I think you can something similar for the text?