Weatherflow Tempest integration

The lightning is a big reason why I still use the cloud - it filters out the background hits and returns something a lot closer to real. I suspect others will be interested in the rain numbers (I don’t use WF’s rain numbers, there simply isn’t enough Tempests around me to make it worthwhile)


I’m keen on the additional values remaining available somehow - I have no overwhelming preference as to how they remain though.

I use the one in HACS from @briis. It’s dependable and gives all the data I want. I’m not sure what other advantages core will provide besides staying local. I am open to learning.

If you want forecasts in your HA, you have to go to some cloud source anyway. And I do agree with @bacco007 that the more accurate lighting location is a benefit. And also like @bacco007 I don’t use either the raw or “rain checked” precip because they are sometimes wildly off.

Having said that, it would be nice to get unprocessed data directly from the weather station/hub if the internet is unavailable.

So unless @briis wants to stop maintaining Weatherflow in HACS I will probably opt to install both and use a blended system. (if they can coexist).

For now my approach will be:

  • Extend the new REST based API module to also being able to pull Sensor data
  • Add the sensor data to the new weatherflow_forecast module linked to above.
  • Discontinuing the the REST based weatherflow custom integration and replacing it with the above.

With that, you will all be able to get fast realtime data from the core version and more details from an Internet depended version, as they will be able to co-exist. No timeline though, as my real work keeps me busy.

@jeeftor Once the above is done, we should look at maybe merging the two in to one.

2 Likes

Sounds good to me. Let me know when things are done and I can start moving them over…bit-by-bit

@jeeftor and @briis - just wanted to say thanks to you both for the work and collaboration on the weatherflow integrations.

I am a bit of a newbie as only received my tempest a few days ago and have not yet done any HA integration. Very happy to test and help out. I am based in Sydney but use metric (not imperial) measurements :slight_smile:

I’m trying to work out what and how to integrate fully with HA. From this discussion/thread, my understanding is:

  1. HA core integration is coming very soon. This will be local only and pull real-time data from the tempest sensors but does not include additional ‘crowd sourced’ data and forecasts from the internet
  2. use new weatherflow_forecast module (HACS) for additional forecast data
  3. No need to use WeatherFlow2MQTT (HACS) as most of the functionality will be in the core integration
  4. No need to use WeatherFlow Weather (HACS) as the forecast functionality is in the new weatherflow_forecast module

Hopefully I have got this more or less right. Please let me know.

1 Like

All correct except #3 for the moment. There are quite a few extra calculated sensors.

| Sensor ID                    | Name                        | Description                                                                                                                                                                                        | Calculated Sensor | Default Units                                                                                |
| ---------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------- |
| absolute_humidity            | Absolute Humidity           | The amount of water per volume of air                                                                                                                                                              | Yes               | g/m^3                                                                                        |
| air_density                  | Air Density                 | The Air density                                                                                                                                                                                    | Yes               | kg/m^3                                                                                       |
| air_temperature              | Temperature                 | Outside Temperature                                                                                                                                                                                | No                | C°                                                                                           |
| battery                      | Battery                     | The battery level on the sensor (If present)                                                                                                                                                       | Yes               | %                                                                                            |
| battery_mode                 | Battery Mode                | The battery operating mode on the TEMPEST unit (If present)                                                                                                                                        | Yes               | https://help.weatherflow.com/hc/en-us/articles/360048877194-Solar-Power-Rechargeable-Battery |
| beaufort                     | Beaufort Scale              | Beaufort scale is an empirical measure that relates wind speed to observed conditions at sea or on land                                                                                            | Yes               | #                                                                                            |
| cloud_base                   | Cloud Base Altitude         | The estimated altitude above mean sea level (AMSL) to the cloud base                                                                                                                               | Yes               | m                                                                                            |
| current_conditions           | Local Current Conditions    | The estimated current weather conditions derived from only local sensors in Home Assistant format                                                                                                   | Yes               | https://www.home-assistant.io/integrations/weather/                                          |
| current_conditions_txt       | Local Current Conditions Text | The estimated current weather conditions derived from only local sensors in human readable text                                                                                                     | Yes               | Clear Night, Cloudy, Fog, Hail, Lightning, Lightning & Rain, Partly Cloudy, Pouring Rain, Rain, Snow, Snow & Rain, Sunny, Windy, Wind & Rain, *exceptional (not used)*                                          |
| delta_t                      | Delta T                     | Difference between Air Temperature and Wet Bulb Temperature                                                                                                                                        | Yes               | C°                                                                                           |
| dewpoint                     | Dew Point                   | Dewpoint in degrees                                                                                                                                                                                | Yes               | C°                                                                                           |
| dewpoint_description         | Dewpoint Comfort Level      | Textual representation of the Dewpoint value                                                                                                                                                       | Yes               |                                                                                              |
| feelslike                    | Feels Like Temperature      | The apparent temperature, a mix of Heat Index and Wind Chill                                                                                                                                       | Yes               | C°                                                                                           |
| fog_probability              | Fog Probability             | The probability of fog based on current conditions                                                                                                                                                 | Yes               | %                                                                                           |
| freezing_level               | Freezing Level Altitude     | The estimated altitude above mean sea level (AMSL) where the temperature is at the freezing point (0°C/32°F)                                                                                       | Yes               | m                                                                                            |
| illuminance                  | Illuminance                 | How much the incident light illuminates the surface                                                                                                                                                | No                | Lux                                                                                          |
| lightning_strike_count       | Lightning Count             | Number of lightning strikes in the last minute                                                                                                                                                     | Yes               | #                                                                                            |
| lightning_strike_count_1hr   | Lightning Count (Last hour) | Number of lightning strikes during the last hour                                                                                                                                                   | Yes               |                                                                                              |
| lightning_strike_count_3hr   | Lightning Count (3 hours)   | Number of lightning strikes the last 3 hours                                                                                                                                                       | Yes               |                                                                                              |
| lightning_strike_count_today | Lightning Count (Today)     | Number of lightning strikes current day                                                                                                                                                            | Yes               |                                                                                              |
| lightning_strike_distance    | Lightning Distance          | Distance of the last strike                                                                                                                                                                        | No                | km                                                                                           |
| lightning_strike_energy      | Lightning Energy            | Energy of the last strike                                                                                                                                                                          | No                |                                                                                              |
| lightning_strike_time        | Last Lightning Strike       | When the last lightning strike occurred                                                                                                                                                            | Yes               |                                                                                              |
| precipitation_type           | Precipitation Type          | Can be one of None, Rain or Hail                                                                                                                                                                   | No                | 0 = none, 1 = rain, 2 = hail, 3 = rain + hail (heavy rain)                                   |
| pressure_trend               | Pressure Trend              | Returns Steady, Falling or Rising determined by the rate of change over the past 3 hours                                                                                                           | Yes               | trend_text                                                                                   |
| rain_intensity               | Rain Intensity              | A descriptive text of how much is it raining right now                                                                                                                                             | Yes               |                                                                                              |
| rain_rate                    | Rain Rate                   | How much is it raining right now                                                                                                                                                                   | Yes               | mm/h                                                                                         |
| rain_start_time              | Last Rain                   | When was the last time it rained                                                                                                                                                                   | No                | seconds                                                                                      |
| rain_today                   | Rain Today                  | Total rain for the current day. (Reset at midnight)                                                                                                                                                | Yes               | mm                                                                                           |
| rain_yesterday               | Rain Yesterday              | Total rain for yesterday (Reset at midnight)                                                                                                                                                       | Yes               | mm                                                                                           |
| rain_duration_today          | Rain Duration (Today)       | Total rain minutes for the current day. (Reset at midnight)                                                                                                                                        | Yes               | minutes                                                                                      |
| rain_duration_yesterday      | Rain Duration (Yesterday)   | Total rain minutes yesterday                                                                                                                                                                       | Yes               | minutes                                                                                      |
| relative_humidity            | Humidity                    | Relative Humidity                                                                                                                                                                                  | No                | %                                                                                            |
| sealevel_pressure            | Station Pressure            | Preasure measurement at Sea Level                                                                                                                                                                  | Yes               | MB                                                                                           |
| snow_probability             | Snow Probability            | The probability of snow based on current conditions                                                                                                                                                | Yes               | %                                                                                           |
| status                       | Status                      | How long has the device been running and other HW details                                                                                                                                          | No                |                                                                                             |
| solar_elevation              | Solar Elevation             | Sun Elevation in Degrees with respect to the Horizon                                                                                                                                                | Yes                | ° (degree)                                                                                 |
| solar_insolation              | Solar Insolation           | Estimation of Solar Radiation at current sun elevation angle                                                                                                                                        | Yes                | W/m^2                                                                                       |
| solar_radiation              | Solar Radiation             | Electromagnetic radiation emitted by the sun                                                                                                                                                        | No                | W/m^2                                                                                       |
| station_pressure             | Station Pressure            | Pressure measurement where the station is located                                                                                                                                                  | No                | MB                                                                                           |
| status                       | Status                      | How long has the device been running and other HW details                                                                                                                                          | No                | Version Attribute returns the current version of this integration                             |
| temperature_description      | Temperature Level           | Textual representation of the Outside Air Temperature value                                                                                                                                        | Yes               | Text                                                                                         |
| uv                           | UV Index                    | The UV index                                                                                                                                                                                        | No                | Index                                                                                       |
| uv_description               | UV Level                    | Textual representation of the UV Index value                                                                                                                                                        | Yes               |                                                                                             |
| visibility                   | Visibility                  | Distance to the horizon                                                                                                                                                                            | Yes               | km                                                                                           |
| voltage                      | Voltage                     | The voltage on the sensor (If present)                                                                                                                                                              | No                | Volts                                                                                       |
| wetbulb                      | Wet Bulb Temperature        | Temperature of a parcel of air cooled to saturation (100% relative humidity)                                                                                                                        | Yes               | C°                                                                                           |
| wet_bulb_globe_temperature   | Wet Bulb Globe Temperature  | The WetBulb Globe Temperature (WBGT) is a measure of the heat stress in direct sunlight, which takes into account: temperature, humidity, wind speed, sun angle and cloud cover (solar radiation). | Yes               | C°                                                                                           |
| wind_bearing                 | Wind Bearing                | Current measured Wind bearing in degrees                                                                                                                                                           | No                | Degrees                                                                                      |
| wind_bearing_avg             | Wind Bearing Avg            | The average wind bearing in degrees                                                                                                                                                                | No                | Degrees                                                                                      |
| wind_direction               | Wind Direction              | Current measured Wind bearing as compass symbol                                                                                                                                                    | Yes               | Cardinal                                                                                     |
| wind_direction_avg           | Wind Direction Avg          | The average wind direction as a compass string                                                                                                                                                     | Yes               | Cardinal                                                                                     |
| wind_gust                    | Wind Gust                   | Highest wind speed for the last minute                                                                                                                                                             | No                | m/s                                                                                          |
| wind_lull                    | Wind Lull                   | Lowest wind for the last minute                                                                                                                                                                    | No                | m/s                                                                                          |
| wind_speed                   | Wind Speed                  | Current measured Wind Speed                                                                                                                                                                        | No                | m/s                                                                                          |
| wind_speed_avg               | Wind Speed Avg              | Average wind speed for the last minute                                                                                                                                                             | No                | m/s                                                                                          |
| weather                      | Weather                     | Only available if STATION_ID and STATION_TOKEN have valid data (See above). State will be current condition, and forecast data will be in the attributes.                                          | No                |                                                                                              |
| zambretti_number             | Zambretti Number            | Local Weather Forecast for the near future utilizing the Beteljuice Zambretti Algorhithm.                                                                                                           | Yes               | (0-25) number corresponds to Zambretti letters A-Z                                            |
| zambretti_text               | Zambretti Text                     | Local Weather Forecast for the near future utilizing the Beteljuice Zambretti Algorhithm.                                                                                                   | Yes               | Weather Forecast Text                                                                        |

Thank you. This is helpful.

I have mqtt broker on my network so I could use WeatherFlow2MQTT but I need to find a use case for all the additional information.

Are you using any of these calculated sensors? If so, what are you using?

I tested the beta version of WeatherFlow and what I will miss is:

Temperature statistics:
Max and Min of Day, Max and Min of month and Max and Min of any time,

The number of mm of rain of the previous day.

The number of lightnings.

The wind direction is indicated only in degrees, not N,S, E and W.

I hope these stats will be available somewhere.

IMG_7788

Hi @jata
For a newbie I would agree with your own suggestion. Hopefully I will shortly be able to deliver the remaining sensors in the weatherflow_forecast integration, so that the two integrations combined would give you a very complete picture of all the data you can get from your weather station

1 Like

Hi @ValMarDav
If you want to stay local, you can create most of what you are missing with local Template Sensors and/or Helpers. Min/Max sensors for instance is a standard helper sensor, you can create from the UI

1 Like

Thanks everyone! I will start with the local core integration and the forecast module.

I see that Weatherflow core just been released with 2023.10 so congrats to @jeeftor

Are you going hacs or core with forecast?

I am starting with core only and once I have this all worked through, I will look at weatherflow_forecast to see how the two compliment each other.

I see wind direction is in degrees - is it possible to display this N, S, W, E etc?

For the wind direction, I found this. It works well.

- platform: template
  sensors:
    weather_wind_dir:  
      friendly_name: 'Wind Direction'
      value_template: >
        {% set direction = ['N','NNE','NE','ENE','E','ESE','SE','SSE','S','SSW','SW','WSW','W','WNW','NW','NNW','N'] %}
        {% set degree = states('sensor.wind_dir')|float %}
        {{ direction[((degree+11.25)/22.5)|int] }}
2 Likes

I stay with Custom. All the work needed to get it in to core, is too much for me, so I will just stay here.
I am self-taught on Python, and I am not sure I can deliver on all the requirements needed to get it to core standards.

Test coverage is the hardest part usually.

I also orginally created the UniFi Protect integration. Later I got fantastic support from two other Developers in making it ready for Core integration, and even though this was a much more complex integration, I was part of all the dialog - and honestly, a lot of what they did and wrote went above me. Fortunately the two other guys are very skilled so it is now part of Home Assistant, but I do no longer maintain it.

And yes, Test coverage is hard. I can only do very basic testing, I simply havn’t learned how to do it. So for now I stick with doing Custom Integrations, and do them as well as I can. And with this amazing community, there is always someone who want to help when needed.

1 Like

Hello.

I have tried installing this integration, but it stalls from the onset with ‘Unable to discover Tempest WeatherFlow devices. Click submit to try again.’

‘UDP discovery error’

I currently have the weatherflow station installed via MQTT /HACS

You can’t have two integrations that work at the same time. Before installing the new version, stop or uninstall the MQTT version.

I’m an avid Weatherflow owner and wanted to get this working on my HA setup.

Adding the Weatherflow integration from the ‘add integration’ button I get an error after about 10 seconds saying “Config flow could not be loaded: Unknown error”

I will check out the GitHub site but if anyone has ideas how to fix it ?