コード例 #1
0
 def __init__(
     self,
     hass: HomeAssistant,
     vehicle: RenaultVehicle,
     details: models.KamereonVehicleDetails,
     scan_interval: timedelta,
 ) -> None:
     """Initialise vehicle proxy."""
     self.hass = hass
     self._vehicle = vehicle
     self._details = details
     self._device_info: DeviceInfo = {
         ATTR_IDENTIFIERS: {(DOMAIN, cast(str, details.vin))},
         ATTR_MANUFACTURER: (details.get_brand_label() or "").capitalize(),
         ATTR_MODEL: (details.get_model_label() or "").capitalize(),
         ATTR_NAME: details.registrationNumber or "",
         ATTR_SW_VERSION: details.get_model_code() or "",
     }
     self.coordinators: dict[str, RenaultDataUpdateCoordinator] = {}
     self.hvac_target_temperature = 21
     self._scan_interval = scan_interval
コード例 #2
0
 def __init__(
     self,
     hass: HomeAssistant,
     vehicle: RenaultVehicle,
     details: models.KamereonVehicleDetails,
     scan_interval: timedelta,
 ) -> None:
     """Initialise vehicle proxy."""
     self.hass = hass
     self._vehicle = vehicle
     self._details = details
     self._device_info: DeviceInfo = {
         "identifiers": {(DOMAIN, cast(str, details.vin))},
         "manufacturer": (details.get_brand_label() or "").capitalize(),
         "model": (details.get_model_label() or "").capitalize(),
         "name": details.registrationNumber or "",
         "sw_version": details.get_model_code() or "",
     }
     self.coordinators: dict[str, RenaultDataUpdateCoordinator] = {}
     self.hvac_target_temperature = 21
     self._scan_interval = scan_interval