For anyone struggling with, or interested in, integrating Davis WeatherLink with Home Assistant, here are the steps that I took:
You have 2 options:
-
You can generate an API token in WeatherLink Instruction Video and make an API call.
-
If your data logger is on the same LAN, you can call it directly (REST).
My data logger is on the same network segment as my HA box, so I chose option 2.
Then created a RESTful sensor in configuration.yaml (or imported package).
sensor:
- name: davis_vantage_pro_curr
platform: rest
resource: 'http://172.16.0.11/v1/current_conditions'
json_attributes:
- data
value_template: 'Vantage Pro'
- platform: template
sensors:
temp:
friendly_name: 'Temperature'
device_class: temperature
unit_of_measurement: "°F"
value_template: '{{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["temp"] }}'
hum:
friendly_name: 'Humidity'
device_class: humidity
unit_of_measurement: "%"
value_template: '{{ state_attr("sensor.davis_vantage_pro_curr", "data")["conditions"][0]["hum"] }}'
Add more template sensors as desired.
Here is a sample of the data returned by my Vantage Pro2:
{
"data": {
"did": "XXXXXXXXXXXX",
"ts": 1567218910,
"conditions": [
{
"lsid": 226873,
"data_structure_type": 1,
"txid": 7,
"temp": 77,
"hum": 41.7,
"dew_point": 52,
"wet_bulb": 57.5,
"heat_index": 76.2,
"wind_chill": 77,
"thw_index": 76.2,
"thsw_index": null,
"wind_speed_last": 0,
"wind_dir_last": 0,
"wind_speed_avg_last_1_min": 0,
"wind_dir_scalar_avg_last_1_min": null,
"wind_speed_avg_last_2_min": 0,
"wind_dir_scalar_avg_last_2_min": null,
"wind_speed_hi_last_2_min": 0,
"wind_dir_at_hi_speed_last_2_min": 0,
"wind_speed_avg_last_10_min": 0,
"wind_dir_scalar_avg_last_10_min": null,
"wind_speed_hi_last_10_min": 0,
"wind_dir_at_hi_speed_last_10_min": 0,
"rain_size": 1,
"rain_rate_last": 0,
"rain_rate_hi": 0,
"rainfall_last_15_min": 0,
"rain_rate_hi_last_15_min": 0,
"rainfall_last_60_min": 0,
"rainfall_last_24_hr": 0,
"rain_storm": 0,
"rain_storm_start_at": null,
"solar_rad": null,
"uv_index": null,
"rx_state": 0,
"trans_battery_flag": 0,
"rainfall_daily": 0,
"rainfall_monthly": 28,
"rainfall_year": 658,
"rain_storm_last": 21,
"rain_storm_last_start_at": 1565236800,
"rain_storm_last_end_at": 1565496060
},
{
"lsid": 226871,
"data_structure_type": 4,
"temp_in": 74.6,
"hum_in": 36.3,
"dew_point_in": 46.1,
"heat_index_in": 73.2
},
{
"lsid": 226870,
"data_structure_type": 3,
"bar_sea_level": 30.128,
"bar_trend": 0.039,
"bar_absolute": 24.852
}
]
},
"friendly_name": "davis_vantage_pro_curr"
}
Enjoy!