1 """Support for the Nissan Leaf Carwings/Nissan Connect API."""
3 from __future__
import annotations
12 from .
import LeafDataStore
13 from .const
import SIGNAL_UPDATE_LEAF
15 _LOGGER = logging.getLogger(__name__)
19 """Base class for Nissan Leaf entity."""
21 def __init__(self, car: LeafDataStore) ->
None:
22 """Store LeafDataStore upon init."""
26 """Log registration."""
28 "Registered %s integration for VIN %s",
29 self.__class__.__name__,
35 """Return default attributes for Nissan leaf entities."""
37 "next_update": self.
carcar.next_update,
38 "last_attempt": self.
carcar.last_check,
39 "updated_on": self.
carcar.last_battery_response,
40 "update_in_progress": self.
carcar.request_in_progress,
41 "vin": self.
carcar.leaf.vin,
45 """Register callbacks."""
55 """Update the state."""
None __init__(self, LeafDataStore car)
None _update_callback(self)
None log_registration(self)
None async_added_to_hass(self)
dict[str, Any] extra_state_attributes(self)
None async_schedule_update_ha_state(self, bool force_refresh=False)
None async_on_remove(self, CALLBACK_TYPE func)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)