mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Remove dead code in Environment Canada integration (#63946)
This commit is contained in:
parent
ec1b45c922
commit
1d9318233d
@ -2,9 +2,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import re
|
|
||||||
|
|
||||||
import voluptuous as vol
|
|
||||||
|
|
||||||
from homeassistant.components.weather import (
|
from homeassistant.components.weather import (
|
||||||
ATTR_CONDITION_CLEAR_NIGHT,
|
ATTR_CONDITION_CLEAR_NIGHT,
|
||||||
@ -35,16 +32,6 @@ from homeassistant.util import dt
|
|||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
def validate_station(station):
|
|
||||||
"""Check that the station ID is well-formed."""
|
|
||||||
if station is None:
|
|
||||||
return None
|
|
||||||
if not re.fullmatch(r"[A-Z]{2}/s0000\d{3}", station):
|
|
||||||
raise vol.Invalid('Station ID must be of the form "XX/s0000###"')
|
|
||||||
return station
|
|
||||||
|
|
||||||
|
|
||||||
# Icon codes from http://dd.weatheroffice.ec.gc.ca/citypage_weather/
|
# Icon codes from http://dd.weatheroffice.ec.gc.ca/citypage_weather/
|
||||||
# docs/current_conditions_icon_code_descriptions_e.csv
|
# docs/current_conditions_icon_code_descriptions_e.csv
|
||||||
ICON_CONDITION_MAP = {
|
ICON_CONDITION_MAP = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user