Files
homeassistant/packages/sensor/openweather.yaml
2020-12-27 17:25:33 +01:00

18 lines
546 B
YAML

sensor:
- platform: rest
name: openweather_coslada
scan_interval: 60
json_attributes:
- main
- weather
value_template: '{{ value_json["weather"][0]["description"].title() }}'
resource: !secret openweather_coslada
- platform: template
sensors:
temperatura_exterior:
friendly_name: 'Temperatura Exterior'
value_template: '{{states.sensor.openweather_coslada.attributes.main["temp"]| float | round(1) }}'
unit_of_measurement: 'ºC'
entity_id: sensor.openweather_coslada