Weather Display and MQTT

Works good!!! Thank you so much!!!

Works fine!!! Thank you so much!!!

This looks very promising for getting Davis weather station into HA. But my understanding of all the components here is not good enough, so I am hoping someone here can point me in the right direction.

I have configured the WD end, and sent messages through to HA. In HA I have the Mosquitto MQTT broker addon installed and that is working for 2 other things (Actron Air conditioner integration and Solar Analytics addor for an MPP Solar inverter). If I use MQTT explorer and point to the HA broker, I can see pretty similar stuff as in the screenshot Brage has put above with the various weather readings from WD, so it appears to be all up there. So I suspect my issue is with HA configuration to get those sensors recognised in the various integrations, devices and enties in HA so I have visibility of them.

I have taken Edwin’s config above and taken my best guess at editing to account for :-

  1. my requirements given I am in Australia with different units of measurements (ie deg C, km/h, kPa etc), and
  2. the new message format to get ride of depreciated syntax.

So all of this I could be completely stuffing up, because I don’t really have a good understand of this. But this is what I have come up with :-

mqtt:
  sensor:
  - name: "Temperature"
    icon: mdi:thermometer
    state_topic: "temp"
    unit_of_measurement: '°C'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Humidity"
    icon: mdi:water-percent
    state_topic: "hum"
    unit_of_measurement: '%'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Barometer"
    icon: mdi:trending-up
    state_topic: "baro"
    unit_of_measurement: 'hPa'
    value_template: '{{ value.split("{")[1].split("in. }")[0] | float }}'
  - name: "Wind Speed"
    icon: mdi:weather-windy
    state_topic: "wind"
    unit_of_measurement: 'km/h'
    value_template: '{{ value.split("{")[1].split(" km/h }")[0] | float }}'

I have done this and restarted HA which now restarts without errors. But I can’t find any evidence of this in Integrations, devices or Entities (but I might be looking in the wrong place). Under the “core-mosquitto MQTT” “Integrations”, I can see 2 devices and 85 entities, but this is the same as before and these 2 devices at the Actron AC, and the MPP Solar inverter.

So I am running out of ideas, and any assistance from someone here would be greatly appreciated to get this going.

Thanks heaps in advance.

Actually, my bad. After bumbling around in the dark, I figured out my issue. “Entities” had been created, I was just not looking in the right place and because I had given the too generic “names” above to the sensors, it was hidding amoungst the other entities with similar names. So I have renamed that “VP2_
” and they are all there.

So thanks for this post for pointing me in the right direction.

I may be asking a dumb question but here it goes.

I have a lot of weather information extracted from airports METAR from NOAA web. I am desperately trying MQTT to transmit a raw text string to HA in order to display what is called “raw metar” but I am not getting anything.

Is there a way to capture a string as a sensor in ha mqtt integration?

Thanks in advance.

Yes of course you can MQTT Text - Home Assistant

Hello. I have a problem with the proper display of data in home assistant. In the mqtt.in file, the data is displayed correctly, and in the home assistant, the entity has an unknown status.

I have no idea what system you are using. Where is mqtt.in coming from?

He is using Weather Display. There is a feature where you can use MQTT to send the data somewhere else. I use it to send data to home assistant.
You configure a mqttin file WD generates a mqttout file which are the values of the entities you’ve chosen.

First check in the WD directory and find mqttou. See if it makes sense.

Then on configuartion,yaml check the the mqtt section. My code is below.

mqtt:
  sensor:
  - name: "Temperature"
    state_topic: "temp"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
    icon: mdi:thermometer
  - name: "Humidity"
    icon: mdi:water-percent
    state_topic: "hum"
    unit_of_measurement: '%'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Barometer"
    icon: mdi:trending-up
    state_topic: "baro"
    unit_of_measurement: 'inHg'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Wind Speed"
    icon: mdi:weather-windy
    state_topic: "wind"
    unit_of_measurement: 'mph'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Max Temp"
    icon: mdi:thermometer
    state_topic: "maxtemp"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Max Temp Time"
    state_topic: "maxtemptime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Min Temp"
    icon: mdi:thermometer
    state_topic: "mintemp"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Min Temp Time"
    state_topic: "mintemptime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Dew Point"
    icon: mdi:weather-fog
    state_topic: "dewpoint"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Heat Index"
    state_topic: "heatindex"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Wind Chill"
    state_topic: "windchill"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Min Wind Chill"
    state_topic: "minwindchill"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Min Wind Chill Time"
    state_topic: "minwindchilltime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Max Wind Chill"
    state_topic: "maxwindchill"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Max Wind Chill Time"
    state_topic: "maxwindchilltime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Max Temp"
    icon: mdi:thermometer
    state_topic: "maxtemp"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Min Temp"
    icon: mdi:thermometer
    state_topic: "lowtemp"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Wind Gust Speed"
    icon: mdi:weather-windy
    state_topic: "gustspeed"
    unit_of_measurement: 'mph'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Wind Direction"
    icon: mdi:subdirectory-arrow-right
    state_topic: "winddirection"
    unit_of_measurement: '°'
    value_template: '{{ value.split("{")[1].split(" }")[0] | int }}'
  - name: "Wind label"
    state_topic: "windlabel"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:compass
  - name: "Max Wind Gust"
    icon: mdi:weather-windy
    state_topic: "maxgust"
    unit_of_measurement: 'mph'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Max Wind Gust Time"
    state_topic: "maxwindgusttime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Baro Change"
    icon: mdi:trending-up
    state_topic: "barochange"
    unit_of_measurement: 'inHg/hr'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "High Baro"
    icon: mdi:trending-up
    state_topic: "hibaro"
    unit_of_measurement: 'inHg'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "High Baro Time"
    state_topic: "hibarotime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Low Baro"
    icon: mdi:trending-up
    state_topic: "lowbaro"
    unit_of_measurement: 'inHg'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Low Baro Time"
    state_topic: "lowbarotime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Yesterday's Max Baro"
    icon: mdi:trending-up
    state_topic: "yesmaxbaro"
    unit_of_measurement: 'inHg'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Yesterday's Max Baro Time"
    state_topic: "yesmaxbarotime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Yesterday's Min Baro"
    icon: mdi:trending-up
    state_topic: "yesminbaro"
    unit_of_measurement: 'inHg'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Yesterday's Min Baro Time"
    state_topic: "yesminbarotime"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
    icon: mdi:clock
  - name: "Yesterday's Max Humidity"
    icon: mdi:water-percent
    state_topic: "maxhumyest"
    unit_of_measurement: '%'
    value_template: '{{ value.split("{")[1].split("}")[0] | int }}'
  - name: "Today's Rainfall"
    icon: mdi:weather-rainy
    state_topic: "todayrain"
    unit_of_measurement: 'in'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Monthly Rainfall"
    icon: mdi:weather-rainy
    state_topic: "monthrain"
    unit_of_measurement: 'in'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Yearly Rainfall"
    icon: mdi:weather-rainy
    state_topic: "yearrain"
    unit_of_measurement: 'in'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Hourly Rainfall"
    icon: mdi:weather-rainy
    state_topic: "hourrain"
    unit_of_measurement: 'in'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Cloud Cover"
    icon: mdi:cloud-outline
    state_topic: "cloudcover"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
  - name: "Solar Energy"
    state_topic: "solarenergy"
    unit_of_measurement: 'W/m2'
    value_template: '{{ value.split("{")[1].split("}")[0] | int }}'
    icon: mdi:weather-sunny
  - name: "VP Forecast"
    icon: mdi:card-text-outline
    state_topic: "vpforecast"
    unit_of_measurement: ''
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
  - name: "Cloud Height"
    icon: mdi:cloud-outline
    unit_of_measurement: 'ft'
    state_topic: "cloudheight"
    value_template: '{{ value.split("{")[1].split("}")[0] | int }}'
  - name: "Indoor Temp"
    icon: mdi:thermometer
    state_topic: "indoortemp"
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
    unit_of_measurement: '°F'
  - name: "Indoor Humidity"
    icon: mdi:water-percent
    state_topic: "indoorhum"
    value_template: '{{ value.split("{")[1].split("}")[0] | int }}'
    unit_of_measurement: '%'
  - name: "Rain Rate"
    icon: mdi:weather-rainy
    state_topic: "rainrate"
    unit_of_measurement: 'in/hr'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "24 hour Ave Temp"
    icon: mdi:thermometer
    state_topic: "24houravetemp"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Temp change last hour"
    icon: mdi:thermometer
    state_topic: "tempchangehr"
    unit_of_measurement: '°F'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Hum change last hour"
    icon: mdi:water-percent
    unit_of_measurement: '%'
    state_topic: "humchangehr"
    value_template: '{{ value.split("{")[1].split("}")[0] | int }}'
  - name: "Max Gust last hour"
    state_topic: "maxgustlasthour"
    unit_of_measurement: 'mph'
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
    icon: mdi:weather-windy
  - name: "Feels Like"
    unit_of_measurement: '°F'
    state_topic: "apparenttemp"
    icon: mdi:thermometer
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Yesterday's rainfall"
    unit_of_measurement: 'in'
    state_topic: "yesrainfall"
    icon: mdi:weather-rainy
    value_template: '{{ value.split("{")[1].split("  }")[0] | float }}'
  - name: "Rainfall last 7 days"
    unit_of_measurement: 'in'
    icon: mdi:weather-rainy
    state_topic: "rainlast7days"
    value_template: '{{ value.split("{")[1].split("}")[0] | float }}'
  - name: "Yesterday's Max Temp"
    unit_of_measurement: '°F'
    icon: mdi:thermometer
    state_topic: "maxtempyest"
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Yesterday's Max Temp Time"
    unit_of_measurement: ''
    icon: mdi:clock
    state_topic: "maxtempyestt"
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
  - name: "Yesterday's Min Temp"
    unit_of_measurement: '°F'
    icon: mdi:thermometer
    state_topic: "mintempyest"
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'
  - name: "Yesterday's Min Temp Time"
    unit_of_measurement: ''
    icon: mdi:clock
    state_topic: "mintempyestt"
    value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
  - name: "Storm Rain"
    icon: mdi:weather-rainy
    state_topic: "stormrain"
    unit_of_measurement: 'in'
    value_template: '{{ value.split("{")[1].split(" }")[0] | float }}'

Hello again


It don®t work anymore to pic out timestamps from the sensors from Weather Display
?

Here is my sensor:

sensor:
    - name: "WD Moonset"
      state_topic: "moonset"
      unit_of_measurement: ''
      value_template: '{{ value.split("{")[1].split("}")[0].strip() }}'
      icon: mdi:theme-light-dark

Hope for help


Johan

I got “Unknown” value


Hopefully, somebody can help a complete Noob to Home assistant.

Using the examples above, I was able to assign NUMERICAL Weather Display data to various Home assistant sensors through MQTT 
 unfortunately, for the life of me I have yet to figure out how to do the same with TEXTUAL data like ‘wind direction’ (ex. NNW) and ‘weather warning’ textual output from the Weather Display program.

Here is the output into MQTT 


Anyone with helpful ideas ?

if you have a textual response in the mqtt topic and have the following set in the sensor
unit_of_measurement: ‘’
remove the line.
It seems if unit_of_measurement is configured then a int/float is expected.

1 Like