I am scraping text from a page that shows the current Fire restrictions. I’m trying to use card mod to color the icon based on the text scraped the options are as follows:
- Burning is not allowed [Icon is Red]
- Burning is only allowed between 7:00 pm and 8:00 am (burning is not allowed before 7:00pm) [Icon is Yellow]
- Burning is allowed between 2:00 pm and 8:00am [Icon is Green]
I’ve gotten as far as changing the color but without any conditions, the icon is forever red currently.
type: entities
entities:
- entity: sensor.fire_restriction
name: Halifax County
title: Fire Restrictions
state_color: false
show_header_toggle: false
card_mod:
style: |
:host {
--card-mod-icon-color: red
}
Thanks,
Rob