9.3 KiB
title, description, logo, ha_category, ha_release, ha_iot_class
| title | description | logo | ha_category | ha_release | ha_iot_class | |||
|---|---|---|---|---|---|---|---|---|
| Environment Canada Weather | Weather data from Environment Canada. | environment_canada.png |
|
0.95 | Cloud Polling |
The environment_canada weather platforms provide meteorological data for Canadian locations from Environment Canada.
The following device types and data are supported:
- Weather - Current conditions and forecasts
- Sensor - Current conditions and alerts
- Camera - Radar imagery
On Raspbian or Hassbian, you may need to manually install additional prerequisites with the following command:
sudo apt-get install libatlas-base-dev libopenjp2-7
Location Selection
Each platform automatically determines which weather station's data to use. However, as station coordinates provided by Environment Canada are somewhat imprecise, in some cases you may need to override the automatic selection to use the desired station.
For each platform, the location to use is determined according to the following hierarchy:
- Location ID specified in platform configuration (optional)
- Closest station to latitude/longitude specified in platform configuration (optional
- Closest station to latitude/longitude specified in Home Assistant core configuration
Weather
The environment_canada weather platform populates a weather card with Environment Canada current conditions and forecast data.
To add Environment Canada weather to your installation, add the following to your configuration.yaml file:
# Example configuration.yaml entry
weather:
- platform: environment_canada
- The platform checks for new data every 10 minutes, and the source data is typically updated hourly within 10 minutes after the hour.
- If no name is given, the weather entity will be named
weather.<station_name>. - The platform automatically determines which weather station to use based on the system's latitude/longitude settings. For greater precision, it is also possible to specify either:
- A specific station code of the form
AB/s0000123based on those listed in this CSV file, or - A specific latitude/longitude
- A specific station code of the form
{% configuration %}
latitude:
description: Part of a set of coordinates to use when finding the closest weather station.
required: inclusive
type: float
longitude:
description: Part of a set of coordinates to use when finding the closest weather station.
required: inclusive
type: float
station:
description: The station code of a specific weather station to use. Station codes must be in the form AB/s0000123, where ABis a provincial abbreviation and s0000123 is a numeric station code. If provided, this station will be used and any latitude/longitude coordinates provided will be ignored.
required: false
type: string
name:
description: Name to be used for the entity ID, e.g. weather.<name>.
required: false
type: string
forecast:
description: Specify hourly or daily forecasts. Valid values are 'daily' and 'hourly'.
required: false
type: string
default: daily
{% endconfiguration %}
Sensor
The environment_canada sensor platform creates sensors based on Environment Canada current conditions and alerts.
To add Environment Canada sensors to your installation, add the desired lines from the following example to your configuration.yaml file:
# Example configuration.yaml entry
sensor:
- platform: environment_canada
- A sensor will be created for each of the following conditions, with a default name like
sensor.temperature:temperature- The current temperature, in ºC.dewpoint- The current dewpoint, in ºC.wind_chill- The current wind chill, in ºC.humidex- The current humidex, in ºC.pressure- The current air pressure, in kPa.tendency- The current air pressure tendency, e.g. "Rising".humidity- The current humidity, in %.visibility- The current visibility, in km.condition- A brief text statement of the current weather conditions, e.g. "Sunny".wind_speed- The current sustained wind speed, in km/h.wind_gust- The current wind gust, in km/h.wind_dir- The current cardinal wind direction, e.g. "SSW".wind_bearing- The current wind direction in degrees.high_temp- The next forecast high temperature, in ºC.low_temp- The next forecast low temperature, in ºC.uv_index- The next forecast UV index.pop- The next forecast probability of precipitation, in %.text_summary- A textual description of the next forecast period, e.g. "Tonight. Mainly cloudy. Low -12."precip_yesterday- The total amount of precipitation that fell the previous day.warnings- Current warning alerts.watches- Current watch alerts.advisories- Current advisory alerts.statements- Current special weather statements.endings- Alerts that have recently ended.
- The platform automatically determines which weather station to use based on the system's latitude/longitude settings. For greater precision, it is also possible to specify either:
- A specific station code of the form
AB/s0000123based on those listed in this CSV file, or - A specific latitude/longitude
- A specific station code of the form
- In the case of multiple alerts in the same category, the titles and details of each are concatenated together with a pipe (
|) separator.
{% configuration %}
latitude:
description: Part of a set of coordinates to use when finding the closest weather station.
required: inclusive
type: float
longitude:
description: Part of a set of coordinates to use when finding the closest weather station.
required: inclusive
type: float
station:
description: The station code of a specific weather station to use. If provided, this station will be used and any latitude/longitude coordinates provided will be ignored. Station codes must be in the form of AB/s0000123, where ABis a provincial abbreviation and s0000123 is a numeric station code.
required: false
type: string
language:
description: Language to use for entity display names and textual data (English or French).
required: false
type: string
default: english
scan_interval:
description: The time between updates in seconds.
required: false
type: integer
default: 600
{% endconfiguration %}
Alert TTS Script
If you would like to have alerts announced via a text-to-speech service, you can use a script similar to the following:
{% raw %}
weather_alert_tts:
sequence:
- service: tts.amazon_polly_say
data_template:
message: "{{ states('sensor.warnings') }} in effect. {{ state_attr('sensor.warnings', 'alert detail') }}"
{% endraw %}
Camera
The environment_canada camera platform displays Environment Canada meteorological radar imagery.
To add Environment Canada radar imagery to your installation, add the desired lines from the following example to your configuration.yaml file:
# Example configuration.yaml entry
camera:
- platform: environment_canada
On Raspbian or Hassbian, you may need to manually install additional prerequisites with the following command: `sudo apt-get install libatlas-base-dev libopenjp2-7`
- If no name is given, the camera entity will be named
camera.<station_name>_radar. - The platform automatically determines which radar station to use based on the system's latitude/longitude settings. For greater precision, it is also possible to specify either:
- A specific station ID from this table. The code must be in the form
XXXorCXXXX, i.e., remove the leadingConly if the result forms a three-letter code, otherwise, include it. Valid values includeXFTfor Ottawa orCASBVfor Montreal. - A specific latitude/longitude
- A specific station ID from this table. The code must be in the form
{% configuration %}
latitude:
description: Part of a set of coordinates to use when finding the closest radar station.
required: inclusive
type: float
longitude:
description: Part of a set of coordinates to use when finding the closest radar station.
required: inclusive
type: float
station:
description: The station code of a specific radar station to use. If provided, this station will be used and any latitude/longitude coordinates provided will be ignored. Must be in the form XXX or CXXXX.
required: false
type: string
name:
description: Name to be used for the entity ID, e.g. camera.<name>.
required: false
type: string
loop:
description: Boolean setting to determine whether to display an animated GIF of images from the last 2 hours. If false, the latest still image will be displayed.
required: false
default: true
type: boolean
precip_type:
description: Determines whether to use the intensity bands for rain or snow. Valid values are RAIN and SNOW.
required: false
type: string
default: RAIN from April to October, SNOW from November to March
{% endconfiguration %}