Skip to content

Commit

Permalink
Merge pull request #317 from ahessling/fix-WaterHeaterEntityDescription
Browse files Browse the repository at this point in the history
fix: change name of WaterHeaterEntityEntityDescription (breaking change as of HA 2025.1)
Fix #318 
Fix #309
  • Loading branch information
BenPru authored Jan 4, 2025
2 parents 9e7f06c + c093c74 commit 27e1e8a
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions custom_components/luxtronik/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,21 @@
from homeassistant.components.switch import SwitchEntityDescription
from homeassistant.components.update import UpdateEntityDescription, UpdateDeviceClass
from homeassistant.components.water_heater import (
WaterHeaterEntityEntityDescription,
WaterHeaterEntityFeature,
WaterHeaterEntityFeature
)

# fix breaking change due to typo in WaterHeaterEntityDescription (#132888)
WaterHeaterEntityDescription = None

try:
from homeassistant.components.water_heater import (
WaterHeaterEntityDescription
)
except ImportError:
from homeassistant.components.water_heater import (
WaterHeaterEntityEntityDescription as WaterHeaterEntityDescription
)

from homeassistant.const import Platform, UnitOfTemperature
from homeassistant.helpers.entity import EntityDescription
from homeassistant.helpers.typing import StateType
Expand Down Expand Up @@ -178,7 +190,7 @@ def metaclass_resolver(*classes):

@dataclass
class LuxtronikWaterHeaterDescription(
metaclass_resolver(LuxtronikEntityDescription, WaterHeaterEntityEntityDescription)
metaclass_resolver(LuxtronikEntityDescription, WaterHeaterEntityDescription)
):
"""Class describing Luxtronik water heater entities."""

Expand Down

0 comments on commit 27e1e8a

Please sign in to comment.