wonder ground REST API
Wetterstation Besser WI-FI Colour Weather Station + 5in1
Supplement WLAN DE.pdf Manual EN DE.pdf
Die Daten hole ich mir über die REST API
secret.yaml
wunderground_url: https://api.weather.com/v2/pws/observations/current?stationId=IKLEIN82&format=json&units=e&apiKey=XXXX
config/include_sensors/wonderground_rest.yml
- platform: rest
name: pws_report
#friendly_name: PWS Report
json_attributes:
- observations
value_template: '{{ value_json["observations"][0]["obsTimeLocal"].title() }}'
resource: !secret wunderground_url
scan_interval: 300
### 29.12.2022
# {"observations":[{
# "stationID":"IKLEIN82",
# "obsTimeUtc":"2022-12-29T12:15:30Z",
# "obsTimeLocal":"2022-12-29 13:15:30",
# "neighborhood":"Kleinwallstadt",
# "softwareType":null,
# "country":"DE",
# "solarRadiation":null,
# "lon":9.164517,
# "realtimeFrequency":null,
# "epoch":1672316130,
# "lat":49.866959,
# "uv":null,
# "winddir":192,
# "humidity":90,
# "qcStatus":1,
# "imperial":{"temp":51,"heatIndex":51,
# "dewpt":48,
# "windChill":51,
# "windSpeed":1,
# "windGust":1,
# "pressure":29.62,
# "precipRate":0.00,
# "precipTotal":0.07,
# "elev":115
# }}]
###
- platform: template
sensors:
pws_location:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].neighborhood }}"
friendly_name: Location
pws_station_id:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].stationID }}"
friendly_name: Staion ID
pws_type:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].softwareType }}"
friendly_name: Station Type
pws_wind_dir:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].winddir }}"
friendly_name: Wind Direction
unit_of_measurement: "°"
pws_wind_gust:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].windGust }}"
friendly_name: Wind Böe
pws_wind_speed:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].imperial.windSpeed }}"
friendly_name: Wind Speed
unit_of_measurement: "km/h"
pws_humidity:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].humidity }}"
friendly_name: Humidity
unit_of_measurement: "%"
pws_precip_total:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].imperial.precipTotal }}"
friendly_name: Rain Total
unit_of_measurement: "in"
pws_precip_rate:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].imperial.precipRate }}"
friendly_name: Rain Rate
unit_of_measurement: "in"
pws_temp:
value_template: "{{ states.sensor.pws_report.attributes.observations[0].imperial.temp }}"
friendly_name: Temp (F)
unit_of_measurement: "°F"
pws_solar:
friendly_name: Sonnenstrahlung
value_template: "{{ states.sensor.pws_report.attributes.observations[0].solarRadiation }}"
pws_windstaerke_ms:
friendly_name: "Windstärke"
unit_of_measurement: "m/s"
value_template: "{{ states('sensor.pws_wind_speed') | float(0) / 3.6 | round() }}"
pws_temp_c:
friendly_name: "Temperatur (°C)"
unit_of_measurement: "°C"
value_template: "{{ (( states('sensor.pws_temp') | float(0) - 32 ) * 5 / 9 ) | round(2, 'floor') }}"