# Package: fireplace icon in the home page icon row (white while it burns, grey while not, dark grey unavailable). # Hidden outside the heating season: fire out and the boiler switch off. # defaults: entity (fire binary_sensor), boiler (switch that lets the boiler fire) defaults: entity: binary_sensor.heating_fireplace_fire boiler: switch.heating_enabled lvgl: pages: - id: !extend page_home widgets: - obj: id: !extend home_icons widgets: - label: id: fireplace_icon text: "\U000F0E2F" text_font: icon_s text_color: 0x48484A script: - id: fireplace_icon_update then: - lambda: |- const std::string &fire = id(fireplace_fire).state; const bool on = fire == "on"; lv_label_set_text(id(fireplace_icon), on ? "\U000F0E2E" : "\U000F0E2F"); lv_obj_set_style_text_color(id(fireplace_icon), lv_color_hex(on ? 0xFFFFFF : ha_unavailable(fire) ? 0x48484A : 0x8E8E93), 0); lv_obj_set_hidden(id(fireplace_icon), fire == "off" && id(fireplace_boiler).state == "off"); text_sensor: # text, not binary: a binary sensor drops "unavailable" - platform: homeassistant id: fireplace_fire entity_id: ${entity} internal: true on_value: - script.execute: fireplace_icon_update - platform: homeassistant id: fireplace_boiler entity_id: ${boiler} internal: true on_value: - script.execute: fireplace_icon_update