Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.44k stars 259 forks source link

`Enhancement` Add support wind direction in forecast #2329

Open rodolfomachado opened 1 week ago

rodolfomachado commented 1 week ago

Enhancement Summary

Add support wind direction in forecast

Detailed Description

Would be possible to add wind direction in forecast page? I was thinking something like this

image

Additional Context

No response

edwardtfn commented 1 week ago

Which integration are you using for weather?

edwardtfn commented 1 week ago

I've just tested many integrations and those all return the wind direction in degrees, so we could either show it in cardinal names when available (but in this case I have to try some integration where this is available) and degrees if not, or we can implement some code to convert to cardinal names, but in this case a new round of translations would be required. 😞

rodolfomachado commented 1 week ago

I'm using Met.no and it returns wind direction in degrees. I´ve created a template sensor to display wind direction in home screen as:

    {{ state_attr('weather.forecast_casa', 'wind_speed') }}
    {% set winbearing = (state_attr('weather.forecast_casa',

'wind_bearing') | float/45) | int %} {% set winddir = ['N','NE','L','SE','S','SO','O','NO'] %} {{ winddir[winbearing] }}

Maybe, you could use the blueprint to set if the user wants to display wind direction. If so, the user must insert an array like:

['N','NE','L','SE','S','SO','O','NO']

On Fri, 18 Oct 2024 at 04:07, Edward Firmo @.***> wrote:

I've just tested many integrations and those all return the wind direction in degrees, so we could either show it in cardinal names when available (but in this case I have to try some integration where this is available) and degrees if not, or we can implement some code to convert to cardinal names, but in this case a new round of translations would be required. 😞

— Reply to this email directly, view it on GitHub https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/2329#issuecomment-2421604330, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKESNQRXNVDASTUP3KYID5DZ4CXUFAVCNFSM6AAAAABQEE4C72VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRRGYYDIMZTGA . You are receiving this because you authored the thread.Message ID: @.***>