mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Deprecate StarLine engine switch attributes (#133958)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
2f892678f6
commit
0184d8e954
@ -180,6 +180,7 @@ class StarlineAccount:
|
|||||||
"online": device.online,
|
"online": device.online,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Deprecated and should be removed in 2025.8
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def engine_attrs(device: StarlineDevice) -> dict[str, Any]:
|
def engine_attrs(device: StarlineDevice) -> dict[str, Any]:
|
||||||
"""Attributes for engine switch."""
|
"""Attributes for engine switch."""
|
||||||
|
@ -43,8 +43,13 @@ BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = (
|
|||||||
),
|
),
|
||||||
BinarySensorEntityDescription(
|
BinarySensorEntityDescription(
|
||||||
key="run",
|
key="run",
|
||||||
translation_key="is_running",
|
translation_key="ignition",
|
||||||
device_class=BinarySensorDeviceClass.RUNNING,
|
entity_registry_enabled_default=False,
|
||||||
|
),
|
||||||
|
BinarySensorEntityDescription(
|
||||||
|
key="r_start",
|
||||||
|
translation_key="autostart",
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
BinarySensorEntityDescription(
|
BinarySensorEntityDescription(
|
||||||
key="hfree",
|
key="hfree",
|
||||||
|
@ -13,8 +13,11 @@
|
|||||||
"moving_ban": {
|
"moving_ban": {
|
||||||
"default": "mdi:car-off"
|
"default": "mdi:car-off"
|
||||||
},
|
},
|
||||||
"is_running": {
|
"ignition": {
|
||||||
"default": "mdi:speedometer"
|
"default": "mdi:key-variant"
|
||||||
|
},
|
||||||
|
"autostart": {
|
||||||
|
"default": "mdi:auto-mode"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"button": {
|
"button": {
|
||||||
|
@ -64,8 +64,11 @@
|
|||||||
"moving_ban": {
|
"moving_ban": {
|
||||||
"name": "Moving ban"
|
"name": "Moving ban"
|
||||||
},
|
},
|
||||||
"is_running": {
|
"ignition": {
|
||||||
"name": "Running"
|
"name": "Ignition"
|
||||||
|
},
|
||||||
|
"autostart": {
|
||||||
|
"name": "Autostart"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"device_tracker": {
|
"device_tracker": {
|
||||||
|
@ -72,6 +72,7 @@ class StarlineSwitch(StarlineEntity, SwitchEntity):
|
|||||||
def extra_state_attributes(self):
|
def extra_state_attributes(self):
|
||||||
"""Return the state attributes of the switch."""
|
"""Return the state attributes of the switch."""
|
||||||
if self._key == "ign":
|
if self._key == "ign":
|
||||||
|
# Deprecated and should be removed in 2025.8
|
||||||
return self._account.engine_attrs(self._device)
|
return self._account.engine_attrs(self._device)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user