Advertisement
yurghie

Untitled

Mar 29th, 2023
174
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.60 KB | Source Code | 0 0
  1. sensor:
  2. - platform: rest
  3.   name: the_local_weather
  4.   device_class: temperature
  5.   state_class: measurement
  6.   unit_of_measurement: '°C'
  7.   headers:
  8.     Accept: 'application/json'
  9.   scan_interval: 900
  10.   resource_template: 'https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=57.12091&lon=7.54545'
  11.   value_template: "{{ value_json.properties.timeseries[0].data.instant.details.air_temperature }}"
  12.   json_attributes_path: "$.properties.timeseries[0].data.instant.details"
  13.   json_attributes:
  14.    - relative_humidity
  15.     - air_pressure_at_sea_level
  16.     - wind_from_direction
  17.     - wind_speed
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement