mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +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
|
||||
|
||||
import datetime
|
||||
import re
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.weather import (
|
||||
ATTR_CONDITION_CLEAR_NIGHT,
|
||||
@ -35,16 +32,6 @@ from homeassistant.util import dt
|
||||
|
||||
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/
|
||||
# docs/current_conditions_icon_code_descriptions_e.csv
|
||||
ICON_CONDITION_MAP = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user