Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire index value sensor #297

Closed
cloneofghosts opened this issue Aug 21, 2024 · 7 comments · Fixed by #326
Closed

Fire index value sensor #297

cloneofghosts opened this issue Aug 21, 2024 · 7 comments · Fixed by #326
Labels
enhancement New feature or request

Comments

@cloneofghosts
Copy link
Collaborator

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 Pirate-Weather/pirateweather#119 (comment)

@cloneofghosts
Copy link
Collaborator Author

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.

@cloneofghosts
Copy link
Collaborator Author

@alexander0042 Just wanted to check in to see if this is possible? I've setup the Fire Index template provided above but would be nice if it could be available natively.

If it is possible it may make sense to integrate a global fire index source before adding this to the integration.

@alexander0042
Copy link
Collaborator

This is very possible! I'm adding a sensor into 1.6.0 that does this now.

Do you have a source for those risk levels? Just to document where they come from?

@cloneofghosts
Copy link
Collaborator Author

Not sure. I just created an issue from the comment that @jazzyisj left in the fire index issue in the main repo.

@alexander0042
Copy link
Collaborator

I see that now! I just referenced the comment, the levels seem reasonable to me, so I'm on board!

This is included in 1.6.0 PR, and added to the docs (I remembered for once!)

@jazzyisj
Copy link

jazzyisj commented Oct 7, 2024

@alexander0042

Just to document where they come from

https://cwfis.cfs.nrcan.gc.ca/maps/fm3?type=fwih

image

@cloneofghosts
Copy link
Collaborator Author

cloneofghosts commented Oct 8, 2024

@alexander0042 Posted this in the other issue but maybe it got missed:

Did a quick test and it seems to work though after I added the fire index sensor the fire index level sensor wasn't added and I see no way to select it. Also the comments will need to be updated as I just copied one from somewhere else to fix the lint issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants