Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Files

Latest commit

Oct 10, 2020
51aca22 · Oct 10, 2020

History

History
146 lines (141 loc) · 4.7 KB

info.md

File metadata and controls

146 lines (141 loc) · 4.7 KB

Weather Template

Weather Template for Home Assisstant

How it works

This custom component adds a weather template that can be used to merge various weather components for use in a weather card

Configuration

This component adds a weather_template platform that functions similar to the regular template platforms

example configuration:

weather:
- platform: weather_template
  weather:
    darksky_meteobridge:
      availability_template: "{{ true if states('sensor.temperature') != None and states('weather.dark_sky') != None else false }}"
      temperature_template: "{{ states('sensor.temperature') }}"
      temperature_unit_template: "{{ state_attr('sensor.temperature', 'unit_of_measurement') }}"
      condition_template: "{{ states('weather.dark_sky') }}"
      pressure_template: "{{ states('sensor.pressure') }}"
      humidity_template: "{{ states('sensor.humidity') }}"
      wind_template: "{{ states('sensor.wind_speed') }}"
      wind_bearing_template: "{{ states('sensor.wind_bearing') }}"
      ozone_template: "{{ state_attr('weather.dark_sky', 'ozone') }}"
      attribution_template: "{{ state_attr('weather.dark_sky', 'attribution') }} and {{ state_attr('sensor.temperature', 'brand') }}"
      visibility_template: "{{ state_attr('weather.dark_sky', 'visibility') }}"
      forecast_template: "{{ state_attr('weather.dark_sky', 'forecast') | to_json }}"

Configuration Variables

weather
(map)(Required)
Listof your weather stations
station_name
(map)(Required)
The slug of the station
friendly_name
(string)(Optional)
The name to use on the front end.
unique_id
(string)(Optional)
An ID that uniquely identifies this fan. Set this to an unique value to allow customization trough the UI.
condition_template
(template)(Required)
A template that evaluates to a weather condition
temperature_template
(template)(Required)
A template that evaluates to a numeric temperature value
temperature_unit_template
(template)(Required)
A template that evaluates to a temperature unitof measurement (either °F or °C)
availability_template
(template)(Option)
Defines a template to get the available state of the component. If the template returns true, the device is available. If the template returns any other value, the device will be unavailable. If availability_template is not configured, the component will always be available.

Default value:
true
pressure_template
(template)(Optional)
A template that evaluates to a numeric pressure

Default value:
None
humidity_template
(template)(Optional)
A template that evaluates to a numeric humidity

Default value:
None
wind_template
(template)(Optional)
A template that evaluates to a numeric wind speed

Default value:
None
wind_bearing_template
(template)(Optional)
A template that evaluates to a numeric(in degrees) wind bearing

Default value:
None
ozone_template
(template)(Optional)
A template that evaluates to a numeric ozone value

Default value:
None
visibility_template
(template)(Optional)
A template that evaluates to a numeric visibility range

Default value:
None
forecast_template
(template)(Optional)
A template that evaluates proper json representing forcast data.

Default value:
None
attribution_template
(template)(Optional)
A template that evaluates to the text to atribute the data to

Default value:
None