Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor:
- - platform: rest
- name: the_local_weather
- device_class: temperature
- state_class: measurement
- unit_of_measurement: '°C'
- headers:
- Accept: 'application/json'
- scan_interval: 900
- resource_template: 'https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=57.12091&lon=7.54545'
- value_template: "{{ value_json.properties.timeseries[0].data.instant.details.air_temperature }}"
- json_attributes_path: "$.properties.timeseries[0].data.instant.details"
- json_attributes:
- - relative_humidity
- - air_pressure_at_sea_level
- - wind_from_direction
- - wind_speed
Advertisement
Comments
-
- You will need to replace with your own lat and lon, obviously :)
Add Comment
Please, Sign In to add comment
Advertisement