Pirate-Weather / pirate-weather-ha

Replacement for the default Dark Sky Home Assistant integration using Pirate Weather
https://pirateweather.net/
Apache License 2.0
357 stars 24 forks source link

Fire index value sensor #297

Open cloneofghosts opened 3 weeks ago

cloneofghosts commented 3 weeks ago

I've been monitoring the data and it's been bang on. It's even picking up that I'm in a small higher risk pocket!

image

One addition that might be useful is a fire risk level sensor, or maybe that value can just be included as an attribute to the fire index sensors. Most people won't understand how the fire index correlates to the more meaningful risk level. I suppose this could be covered in the docs as well so one could just create their own template sensor if needed.

image

The OpenUV integration does something similar.

image

I've already done it in a template for myself.

template:
  - sensor:
      - name: "Fire Risk Level"
        unique_id: fire_risk_level
        icon: mdi:fire
        state: >
          {% set level = states('sensor.pirateweather_fire_index') | int(-1) %}
          {% if level >= 30 %} Extreme
          {% elif level >= 20 %} Very High
          {% elif level >= 10 %} High
          {% elif level >= 5 %} Moderate
          {% else %} Low
          {% endif %}
        availability: "{{ is_number(states('sensor.pirateweather_fire_index')) }}"

This is how I end up displaying it in the HA ui.

image

Originally posted by @jazzyisj in https://github.com/Pirate-Weather/pirateweather/issues/119#issuecomment-2088343476

cloneofghosts commented 3 weeks ago

Looks like this comment from @jazzyisj got missed from back in May. I remember trying to look into this but couldn't figure anything out.

I'll ping @alexander0042 to see if it's something that could be setup.