diff --git a/custom_components/lucidmotors/number.py b/custom_components/lucidmotors/number.py index 854f451..ae5cf23 100644 --- a/custom_components/lucidmotors/number.py +++ b/custom_components/lucidmotors/number.py @@ -27,7 +27,9 @@ class LucidNumberEntityDescriptionMixin: key_path: list[str] native_value_fn: Callable[[Vehicle], Coroutine[None, None, None]] - set_native_value_fn: Callable[[LucidAPI, Vehicle, float], Coroutine[None, None, None]] + set_native_value_fn: Callable[ + [LucidAPI, Vehicle, float], Coroutine[None, None, None] + ] @dataclass(frozen=True) diff --git a/custom_components/lucidmotors/switch.py b/custom_components/lucidmotors/switch.py index 2d2f192..6150306 100644 --- a/custom_components/lucidmotors/switch.py +++ b/custom_components/lucidmotors/switch.py @@ -6,7 +6,15 @@ import logging from typing import Any -from lucidmotors import APIError, LucidAPI, Vehicle, DefrostState, ChargeState, ChargeAction, AlarmStatus +from lucidmotors import ( + APIError, + LucidAPI, + Vehicle, + DefrostState, + ChargeState, + ChargeAction, + AlarmStatus, +) from homeassistant.components.switch import ( SwitchDeviceClass, @@ -61,7 +69,7 @@ class LucidSwitchEntityDescription( device_class=SwitchDeviceClass.SWITCH, turn_on_function=lambda api, vehicle: api.start_charging(vehicle), turn_off_function=lambda api, vehicle: api.stop_charging(vehicle), - on_value=ChargeState.CHARGE_STATE_CHARGING + on_value=ChargeState.CHARGE_STATE_CHARGING, ), LucidSwitchEntityDescription( key="status", @@ -71,7 +79,7 @@ class LucidSwitchEntityDescription( device_class=SwitchDeviceClass.SWITCH, turn_on_function=lambda api, vehicle: api.turn_alarm_on(vehicle), turn_off_function=lambda api, vehicle: api.turn_alarm_off(vehicle), - on_value=AlarmStatus.ALARM_STATUS_ARMED + on_value=AlarmStatus.ALARM_STATUS_ARMED, ), )