Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion homeassistant/components/buienradar/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@
WeatherEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_CELSIUS
from homeassistant.const import (
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_NAME,
LENGTH_METERS,
LENGTH_MILLIMETERS,
PRESSURE_HPA,
SPEED_METERS_PER_SECOND,
TEMP_CELSIUS,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback

Expand Down Expand Up @@ -112,6 +121,10 @@ class BrWeather(WeatherEntity):
"""Representation of a weather condition."""

_attr_temperature_unit = TEMP_CELSIUS
_attr_pressure_unit = PRESSURE_HPA
_attr_visibility_unit = LENGTH_METERS
_attr_wind_speed_unit = SPEED_METERS_PER_SECOND
_attr_precipitation_unit = LENGTH_MILLIMETERS

def __init__(self, data, config, coordinates):
"""Initialize the platform with a data instance and station name."""
Expand Down