mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Use device class translation for Sensibo update entity (#101888)
Use device class translation for Sensibo update
This commit is contained in:
parent
edf510f9c0
commit
3843e91af0
@ -340,11 +340,6 @@
|
|||||||
"name": "Pure Boost"
|
"name": "Pure Boost"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"update": {
|
|
||||||
"fw_ver_available": {
|
|
||||||
"name": "Update available"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"climate": {
|
"climate": {
|
||||||
"climate_device": {
|
"climate_device": {
|
||||||
"state_attributes": {
|
"state_attributes": {
|
||||||
|
@ -41,7 +41,6 @@ class SensiboDeviceUpdateEntityDescription(
|
|||||||
DEVICE_SENSOR_TYPES: tuple[SensiboDeviceUpdateEntityDescription, ...] = (
|
DEVICE_SENSOR_TYPES: tuple[SensiboDeviceUpdateEntityDescription, ...] = (
|
||||||
SensiboDeviceUpdateEntityDescription(
|
SensiboDeviceUpdateEntityDescription(
|
||||||
key="fw_ver_available",
|
key="fw_ver_available",
|
||||||
translation_key="fw_ver_available",
|
|
||||||
device_class=UpdateDeviceClass.FIRMWARE,
|
device_class=UpdateDeviceClass.FIRMWARE,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
icon="mdi:rocket-launch",
|
icon="mdi:rocket-launch",
|
||||||
|
@ -15,7 +15,7 @@ from homeassistant.util import dt as dt_util
|
|||||||
from tests.common import async_fire_time_changed
|
from tests.common import async_fire_time_changed
|
||||||
|
|
||||||
|
|
||||||
async def test_select(
|
async def test_update(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
load_int: ConfigEntry,
|
load_int: ConfigEntry,
|
||||||
monkeypatch: pytest.MonkeyPatch,
|
monkeypatch: pytest.MonkeyPatch,
|
||||||
@ -23,8 +23,8 @@ async def test_select(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Test the Sensibo update."""
|
"""Test the Sensibo update."""
|
||||||
|
|
||||||
state1 = hass.states.get("update.hallway_update_available")
|
state1 = hass.states.get("update.hallway_firmware")
|
||||||
state2 = hass.states.get("update.kitchen_update_available")
|
state2 = hass.states.get("update.kitchen_firmware")
|
||||||
assert state1.state == STATE_ON
|
assert state1.state == STATE_ON
|
||||||
assert state1.attributes["installed_version"] == "SKY30046"
|
assert state1.attributes["installed_version"] == "SKY30046"
|
||||||
assert state1.attributes["latest_version"] == "SKY30048"
|
assert state1.attributes["latest_version"] == "SKY30048"
|
||||||
@ -43,5 +43,5 @@ async def test_select(
|
|||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
state1 = hass.states.get("update.hallway_update_available")
|
state1 = hass.states.get("update.hallway_firmware")
|
||||||
assert state1.state == STATE_OFF
|
assert state1.state == STATE_OFF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user