pirate-weather-ha
pirate-weather-ha copied to clipboard
Weather temperature discrepancy between Weather Card And Temperature Sensor
Hello,
First of all, I really like what you have created for us here to replace Darksky!!!
However, I am running into an odd discrepancy between the temperature provided by the sensor and the temperature on my actual weather card. I use both in my Home Assistant setup.
Currently, my weather card is showing 47 degrees Fahrenheit. However, the temperature sensor is showing 48.3 degrees Fahrenheit.
Also, I'd like to make a request. Are you able to have the sensor omit the decimal altogether? I realize I can create a value template to round the temperature sensor to omit the decimal, but I'd rather not have to this. I did not have to create the value template for Darksky.
Let me know if you need any additional info!
Thank You, Mike
Something else I just noticed. It seems that the sensor is updating at a different interval than the integration and I think this is causing the discrepancy. Our temperature is dropping as it's becoming dark here. Therefore, if the weather.pirateweather
entity is updating at a different interval than the sensor.pirateweather_temperature
entity I can see why there's a difference in the temperature.
weather.pirateweather
shows updated 6 minutes ago
sensor.pirateweather_temperature
shows updated 11 minutes ago
I would expect (or hope) that these would update at the same time to ensure consistency and accuracy.
Just a observation I noticed
Hey, thanks for reaching out- I really love to hear from people using the service, and always looking for ways to make it more useful!
For the update interval, unless you have an override in your config, it should default to the same, but there's always the potential they're not. Checking the two python scrips, the Sensor.py has a SCAN_INTERVAL = timedelta(seconds=900)
, and Weather.py has MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=15)
, so should be the same. That being said, because they're both timing internally, if they started at different times, or threw an error/ slow update for some reason, they could definitely be out of sync, but should be more or less the same interval.
However, it's a good point that for consistency they should be reporting the same value, and I think the solution here is change the defaults to be a little more ambitious in their update speeds, since that should smooth out these variances. I started with a 15 minute default while seeing how things scaled, but since everything has been performing really nicely, I'm planning on shortening the default interval to either 5 or 10 minutes, Open to other suggestions here, but I'm not sure how to go about implementing it
As for the decimal, that's a great idea! I'm thinking something like a set of us_r
styles that would provide the same units as us
, but rounding to the nearest round number. That way it wouldn't impact anything that expects the Dark Sky response, but provide some additional options.
Thanks, Alexander
@alexander0042 Thanks for your quick reply.....Just an FYI, I modified both Sensor.py and Weather.py to reflect 5 minute intervals.
Also, I do have a couple value_templates in use to round both temperature & humidity to remove the decimal (round), but would love to see this integrated within the pirateweather addon so everything matches without having to create the custom sensors.
Thanks!!
Couple quick follow up questions here.
- What unit system do you typically use, since the easiest way to do this us by extending the unit functionality?
- Which variables did you have in mind? It doesn't really make sense to round them all to the nearest decimal (thinking precipitation as an example that wouldn't work). so maybe just the temperatures?
There has been no activity on this issue for ninety days and unless you comment on the issue it will automatically close in seven days.
This issue has been automatically closed since there has been no further activity after seven days.