initial commit

This commit is contained in:
2022-12-20 21:26:47 +01:00
commit 2962a6db69
722 changed files with 63886 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
"""Base Entity for Hyundai / Kia Connect integration."""
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.helpers.entity import DeviceInfo
from .const import BRANDS, DOMAIN, REGIONS
class HyundaiKiaConnectEntity(CoordinatorEntity):
"""Class for base entity for Hyundai / Kia Connect integration."""
def __init__(self, coordinator, vehicle):
"""Initialize the base entity."""
super().__init__(coordinator)
self.vehicle = vehicle
@property
def device_info(self):
"""Return device information to use for this entity."""
return DeviceInfo(
identifiers={(DOMAIN, self.vehicle.id)},
manufacturer=f"{BRANDS[self.coordinator.vehicle_manager.brand]} {REGIONS[self.coordinator.vehicle_manager.region]}",
model=self.vehicle.model,
name=self.vehicle.name,
)