mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix rainmachine update entities missing display_precision (#129195)
This commit is contained in:
parent
3a39a5caa3
commit
9b0975b2ac
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@ -10,6 +11,7 @@ from regenmaschine.errors import RequestError
|
|||||||
from homeassistant.components.update import (
|
from homeassistant.components.update import (
|
||||||
UpdateDeviceClass,
|
UpdateDeviceClass,
|
||||||
UpdateEntity,
|
UpdateEntity,
|
||||||
|
UpdateEntityDescription,
|
||||||
UpdateEntityFeature,
|
UpdateEntityFeature,
|
||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
@ -42,7 +44,14 @@ UPDATE_STATE_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UPDATE_DESCRIPTION = RainMachineEntityDescription(
|
@dataclass(frozen=True, kw_only=True)
|
||||||
|
class RainMachineUpdateEntityDescription(
|
||||||
|
UpdateEntityDescription, RainMachineEntityDescription
|
||||||
|
):
|
||||||
|
"""Describe a RainMachine update."""
|
||||||
|
|
||||||
|
|
||||||
|
UPDATE_DESCRIPTION = RainMachineUpdateEntityDescription(
|
||||||
key="update",
|
key="update",
|
||||||
api_category=DATA_MACHINE_FIRMWARE_UPDATE_STATUS,
|
api_category=DATA_MACHINE_FIRMWARE_UPDATE_STATUS,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user