-
Notifications
You must be signed in to change notification settings - Fork 7
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
Error while processing template #7
Comments
|
I'm fairly sure at this point that these errors are caused by sensor values that screw with the math in the forecast. It was still broken this morning but after making sure the Home Assistant is giving values like 1008.00hPa instead of 1008.0000hPa for the pressure sensor (by setting suggested_display_precision: 0), the forecast seems to actually be working. sensor.local_forecast_zambretti_detail is still unknown, so I'll check back in 6-12 hours to see if that changes Also, very relatedly, it may be worth explicitly documenting what this integration needs for sensor values/units of measurement/precision requirements to prevent easily fixed errors like this. |
yes, for pressure it's xxxx.xxhPa (two decimal points; in my case, w/ suggested_display_precision set to 0), and temperature it's xx.x°C (one decimal point, which I think is the default w/ temperature entities in HA). as I noted above, my pressure sensor is in raw pascals, but Home Assistant automatically converted it to hectopascals with unit_of_measurement set to 'Pa', and device_class set to 'atmospheric_pressure'. another important thing I found, to prevent Home Assistant trying to do math with empty strings, is to make sure your sensors have availability_template set to something like: this also goes for the forecast temperature/pressure sensor entities, and subsequently the temp/pressure change statistics entities. the latter is easy to work around, but the former is not, due to how Home Assistant's statistics integration 'works'. in regard to that last point, I've been working on some fixes to the weather_forecast.yaml integration that might help alleviate the garbage forecast data and logspam within <3hr of the integration starting up. if I can get something I'm happy with, I'll open up a PR with those changes (and some others I've made). |
Thanks for working out the bugs. With the latest updates the integration broke a bit. I am happy to test out and integrate the PR but sadly I dont have much time at the moment to fix it myself :) |
Is it possible that with the 2024.3.2 core update it stopped working? 😢 |
I'm on 2024.4.0.dev, and the integration is working fine. the fact your lovelace card is populated means it's pretty much working for you too, so this is likely an intermittent logspam thing caused by sensors going unavailable/expiring. my outdoor sensors are 433MHz Oregon Scientific gear going through rtl_433; with the non-ideal antenna placement I have, occasionally of the sensors won't update for a while, expire, and cause the integration to throw errors. I added the following to the Home Assistant config of all the weather sensors this integration uses to help limit the logspam (so the integration and lovelace card only throw roughly one error each when this occurs): without that, Home Assistant will try to do math with empty strings (as the state for an expired/dead entity is always set to '') or possibly divide by zero. if that's happening, there should be corresponding log entries where it says something along the lines of: I would double check the history of all the sensor entities you're using, especially your barometer, and make sure they're not expiring or otherwise going into an unknown state. if they are, fix that first. |
if you just updated HA, try dumping your browser cache by hitting shift+f5 on your dashboard first, but it looks like your temperature entity is the current problem, as pressure_change statistics entity (and therefore the barometer entity) are working properly. if you haven't already, explicitly set the following in your temperature entity's config: and doublecheck explicitly setting the unit of measurement and device class for sensor entities as per this list has fixed a lot of integration/automation problems for me in the past, including with this integration. |
I tried setting this up earlier this week and it didn't work for me so I moved on until I had more time. The attributes of the sensor were never populated so it never worked properly. I've just gone through all the attributes and changed the format to the "new" format e.g. states('sensor.x') instead of states.sensor.x.state and it's now working. |
Hi,
I receive several errors in home-assistant.log when using these sensors. Nevertheless, when I check the different parts in the developer-tools everything is working.
Am I do something wrong?
The text was updated successfully, but these errors were encountered: