Weatherbit.io - Current Weather and Forecast data

Release 0.20

As promised. This release introduces the following changes and fixes:

  • Changed datetime attribute on the forecast_day_x sensors to use the correct local date. Please note, that Weatherbit only supplies the date part, so time will always be 00:00:00.

  • Added new attribute to the Weather Entity called alt_condition. This attribute will show the same data as the state with the exception of the partlycloudy condition, which will separate between a day and night condition called partlycloudy_day and partlycloudy_night respectively.

Update and restart HA, and you should be good to go.

1 Like

@briis Where do I have to copy these icons?

Btw; great integration! :slight_smile:

Thx Erik.
By itself you cannot use them in Home Assistant, but you could modify one of the many Lovelace Weather Cards to use these icons and then they would need to be copied to somewhere in your www directory most likely. My Integration does not use them, I just added the info as someone asked for it.

Anyone in the community who is thinking about using the icons?

@erik7 I have just deployed a Weatherbit Weather card on my GitHub repository. Itā€™s a fork of the Dark Sky Weather Card to work with Weatherbit. Disclaimer: Iā€™m not a JS programmer. I figured out how to change what I wanted to change, and it seems to be working fine for me. Hopefully it will work for and help other people :slightly_smiling_face:

2 Likes

Thanks a lot! Iā€™ll have a look at it. :wink:
Itā€™s the same way I do itā€¦ Use existing code and change/add/try, etc things. :slight_smile:

1 Like

Iā€™m using the weatherbit integration (as well as dark sky). I am only seeing three days forecast in both weatherbit and dark sky, using the default card:

Screen Shot 2020-06-10 at 10.06.50 AM

    - entity: weather.weatherbit_xxxxx
      type: weather-forecast

what do I need to do to see a five day forecast on the face of the card?

Thanks for any help.

@Anwen Iā€™m some issues adding the new sensors. Iā€™m a bit of newbie, so bear with me :wink: Iā€™ve created weatherbit.yaml under my sensors folder (and everything in that folder is pulled into the config). Here is the first entry I put in:

    wbit_icon_condition:
      value_template: "{{ state_attr('weather.weatherbit_franklin', 'alt_condition') }}"

It checks as valid, I restart HA, but when I look under developer tools I donā€™t see wbit_icon_conditon. What am I missing?

Have you set it up as a template sensor?

platform: template
sensors:
  wbit_icon_condition:
    value_template: "{{ state_attr('weather.weatherbit_franklin', 'alt_condition') }}"

@Anwen Thanks. Figured that out about 2 minutes before you posted the reply. Still learning all the HA syntax.

1 Like

Never mind, it appeared with HA core version 0.110.0

No problem, happy to help! Let me know if you have any other issues.

@ffeingol @erik7 Just pushed a fix for the partly cloudy icons, sorry about that!

It is a standard new lovelace weather card that has problems. In theory, you should have a bigger screen resolution to see 5 days but it doesnā€™t always work in such way.

It would be nice to be able to turn the Forecast update time all the way to 0. Iā€™m purely interested in the sensor data to control an irrigation system and would like to update that as granularly as possible with the daily API call limit.

Could I ask you to open an issue on Github, just so your request does not get lost in this Thread.
Just be aware that updates for current data does not seem to occur more often than every 30 min from Weatherbit, and for some locations even less frequently than that. Meaning that if you set Forecast Interval to 2 Hours, you should not run in to any trouble.

Release 0.21

  • Added support for setting the Forecast Language. When retrieving data from Weatherbit, some of the text strings can be translated in to another language. F.ex the weather_text string which gives a text with Forecast. This release now makes it possible to get these strings in local Language. See the README.md for a list of Weatherbit supported languages.

If you are upgrading this Integration, after the restart, go to Integrations and select Options on the Weatherbit Widget to select a new language. Default language is English, so if that is what you want, you donā€™t have to do anything.
If your are installing from Scratch, you will be asked during Configuration.

Please note, this only affects specific sensors and not the Weather Entity, as language for that Entity is handled by Home Assistant.

Hey Bjarne,

install went fine on a new 111.3 system, so thanks again.

please let me ask: the weather integration has an attribute for ozone, which is the only attribute you havent made a separate sensor for? Would you consider adding that please? I know I can create a template sensor, but it might be easiest if the integration makes that automatically.

Also, the windspeed sensor and weather attributes for windspeed use different units, is that on purpose?

Last one for now: could you please add a sensor for wind direction? I see it in the weather forecast card, but again, if we could prevent creating another template sensor, that would be very welcomeā€¦
thanks for considering!

Sure, could you create an issue on Github for this, so I donā€™t miss it.

I assume you are a Metric user, so the Weather Entity needs Wind Speed in km/h as this is how the default Weather Lovelace card expects it. My personal preference is wind speed in m/s, and that is also how Weatherbit delivers it, so I decided not to convert it for the sesnor.

You should have have 2 sensors for Wind Direction: sensor.weatherbit_wind_bearing showing the direction in degrees and sensor.weatherbit_wind_direction showing a textual representation of the bearing. Donā€™t you have these?

done :wink: please add sensor for Ozone Ā· Issue #14 Ā· briis/weatherbit Ā· GitHub

Ill also add one for a Beaufort sensor ā€¦

understand the wind sensor, it is a longstanding thing to have these mixed throughout HA in the various integrations. NM, not very important, and glad you added the m/s sensor.

Yes!, sorry, I missed that beforeā€¦

now that I have you hereā€¦ and this might be a bit of a larger request: would you ever consider breaking out the forecast sensors? So we can do things like:

Since we will soon not have the Dark sky sensors available, I would hope to be able to translate a setup like that to weather bit (without, you feel it coming, having to write templates for all of these sensorsā€¦)

anyways, working fine as it is!

of course those shouldnā€™t have been my last wordsā€¦upon restart all sensors are unavailable and remain so, this in the logs:

2020-06-16 15:43:31 ERROR (MainThread) [custom_components.weatherbit] Unexpected error fetching weatherbit data: Error requesting data from current?lat=redacted3&lang=nl&units=M&key=8redacted8: None
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 136, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 124, in _async_update_data
    return await self.update_method()
  File "/usr/local/lib/python3.7/site-packages/weatherbitpypi/client.py", line 47, in async_get_current_data
    return await self._get_current_data()
  File "/usr/local/lib/python3.7/site-packages/weatherbitpypi/client.py", line 73, in _get_current_data
    json_data = await self.async_request("get", endpoint)
  File "/usr/local/lib/python3.7/site-packages/weatherbitpypi/client.py", line 264, in async_request
    ) from None
weatherbitpypi.errors.RequestError: Error requesting data from current?lat=redacted3&lang=nl&units=M&key=83redacted8: None
2020-06-16 15:43:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: name=custom_components.weatherbit, message=['Unexpected error fetching weatherbit data: Error requesting data from current?lat=redacted3&lang=nl&units=M&key=83efredacted8: None'], level=ERROR, source=['helpers/update_coordinator.py', 124], timestamp=1592315011.4354007, exception=Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 136, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 124, in _async_update_data
    return await self.update_method()
  File "/usr/local/lib/python3.7/site-packages/weatherbitpypi/client.py", line 47, in async_get_current_data
    return await self._get_current_data()
  File "/usr/local/lib/python3.7/site-packages/weatherbitpypi/client.py", line 73, in _get_current_data
    json_data = await self.async_request("get", endpoint)
  File "/usr/local/lib/python3.7/site-packages/weatherbitpypi/client.py", line 264, in async_request
    ) from None
weatherbitpypi.errors.RequestError: Error requesting data from current?redacted&key=83ef2redacted88: None
, count=1, first_occurred=1592315011.4354007>

could this be caused by having the integration on more than 1 Ha instance?cant find anything on an api threshold tbh.