Skip to content

Option to show UV index, incl threshold#273

Open
jandechent wants to merge 4 commits intoalexpfau:mainfrom
jandechent:main
Open

Option to show UV index, incl threshold#273
jandechent wants to merge 4 commits intoalexpfau:mainfrom
jandechent:main

Conversation

@jandechent
Copy link

Description

Under weather there is a option to show the UV index, including a option to set a threshold from which onwards it is shown.

Related Issue

This PR fixes or closes issue: fixes #269 (was from me)

Motivation and Context

High temperature or sunny weather correlate with the need to wear sun screen, but the UV index is best to have in sight.

How Has This Been Tested

Testing conducted on my home assistant instance.

Types of changes

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 🌎 Translation (addition or update for a language)
  • ⚙️ Tech (code style improvement, performance improvement or dependencies update)
  • 📚 Documentation (fix or addition to documentation)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have linted and formatted my code (npm run lint and npm run format)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have tested the change in my local Home Assistant instance.
  • [] I have followed the translation guidelines if I'm adding or updating a translation.

Remarks

  • I don't frequently sent pull requests.
  • The input threshold is not error checked, so users could add letters, later code can deal with this, but thats not ideal
  • I don't understand why the rending of icons works with a leading . before the "icon", but in my code I had to leave the dot out before the icon. Probably because I don't know ts.
  • I was not able to make the threshold disappear, when show_uv is off. The code got too messy for me.
  • I have not found a official icon for UV index and choose the next best.
  • I was not sure, if UV index - which only I seem to request - should got at the very bottm on in the middle.

Preview

  • Left how it looks for events
  • Right how for days
grafik

And here how the editor looks
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Show UV Index if above a threshold

1 participant