Yevgenium / weather-chart-card

Custom weather card with charts
MIT License
275 stars 81 forks source link

Add sensors for humid and pressure, add selectable number of days in chart #50

Closed tomasrudh closed 2 years ago

tomasrudh commented 3 years ago

Change to two decimals when using config temp, a sensor is more accurate than the temperature from the forecast Added config: numDays, to select how many days to show in the graph Added config: humid, to be able to use a specified sensor for humidity Added config: press, to be able to use a specified sensor for pressure Fixed the trap for 'Cannot read property forecast' in drawChart

scstraus commented 3 years ago

Interesting. I have a version in my repo that makes a 24 hour view out of an hourly sensor, if you have a good way to average things out to an arbitrary number of days, maybe you could apply it to the hourly view too.. It would probably work better than mine which just averages every 3 hours and skips 2 icons.

tomasrudh commented 3 years ago

I don't average at all, I simply only use the first number of objects: 340 var data = this.weatherObj.attributes.forecast.slice(0, this.numDays);

scstraus commented 3 years ago

Ah yeah I guess you wouldn’t need to. Not many forecasts go past 9 days