mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Add state to CheckControlMessages in bmw_connected_drive (#75802)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
This commit is contained in:
parent
5e6217f20c
commit
5687150786
@ -39,14 +39,8 @@ def _condition_based_services(
|
|||||||
|
|
||||||
def _check_control_messages(vehicle: MyBMWVehicle) -> dict[str, Any]:
|
def _check_control_messages(vehicle: MyBMWVehicle) -> dict[str, Any]:
|
||||||
extra_attributes: dict[str, Any] = {}
|
extra_attributes: dict[str, Any] = {}
|
||||||
if vehicle.check_control_messages.has_check_control_messages:
|
for message in vehicle.check_control_messages.messages:
|
||||||
cbs_list = [
|
extra_attributes.update({message.description_short: message.state.value})
|
||||||
message.description_short
|
|
||||||
for message in vehicle.check_control_messages.messages
|
|
||||||
]
|
|
||||||
extra_attributes["check_control_messages"] = cbs_list
|
|
||||||
else:
|
|
||||||
extra_attributes["check_control_messages"] = "OK"
|
|
||||||
return extra_attributes
|
return extra_attributes
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user