Skip to content

Commit

Permalink
Merge pull request #36 from gieljnssns/fix-for-2024.1
Browse files Browse the repository at this point in the history
fix for 2024.1+
  • Loading branch information
gieljnssns authored Jan 8, 2024
2 parents 104252b + cc5eac5 commit ef20a78
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions custom_components/buienalarm/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import timedelta
from typing import NamedTuple

from homeassistant.const import LENGTH_MILLIMETERS, TEMP_CELSIUS
from homeassistant.const import UnitOfLength, UnitOfTemperature

SensorType = NamedTuple(
"SensorType",
Expand All @@ -31,21 +31,21 @@
SENSOR_TYPES = {
ITEM_TEMP: SensorType(
"Temperature",
TEMP_CELSIUS,
UnitOfTemperature.CELSIUS,
ICON_THERMOMETER),
ITEM_PRECIP_NOW: SensorType(
"Precipitation",
LENGTH_MILLIMETERS + "/h",
UnitOfLength.MILLIMETERS + "/h",
ICON_WEATHER_POURING
),
ITEM_PRECIP_FORECAST_AVG: SensorType(
"Precipitation forecast average",
LENGTH_MILLIMETERS + "/h",
UnitOfLength.MILLIMETERS + "/h",
ICON_WEATHER_POURING,
),
ITEM_PRECIP_FORECAST_TOTAL: SensorType(
"Precipitation forecast total",
LENGTH_MILLIMETERS,
UnitOfLength.MILLIMETERS,
ICON_WEATHER_POURING
),
ITEM_NEXT_RAIN_FORECAST: SensorType(
Expand All @@ -56,3 +56,4 @@
}
CONF_TIMEFRAME = "timeframe"
CONF_CONDITION_PRECIPITATION = "precipitation"

0 comments on commit ef20a78

Please sign in to comment.