mirror of
https://github.com/home-assistant/core
synced 2024-07-30 21:18:57 +02:00
Add service configuration URL to Verisure (#57713)
This commit is contained in:
parent
9280215d69
commit
efb6300359
@ -42,12 +42,13 @@ class VerisureAlarm(CoordinatorEntity, AlarmControlPanelEntity):
|
|||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this entity."""
|
"""Return device information about this entity."""
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": "Verisure Alarm",
|
name="Verisure Alarm",
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": "VBox",
|
model="VBox",
|
||||||
"identifiers": {(DOMAIN, self.coordinator.entry.data[CONF_GIID])},
|
identifiers={(DOMAIN, self.coordinator.entry.data[CONF_GIID])},
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self) -> str:
|
def unique_id(self) -> str:
|
||||||
|
@ -54,14 +54,15 @@ class VerisureDoorWindowSensor(CoordinatorEntity, BinarySensorEntity):
|
|||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this entity."""
|
"""Return device information about this entity."""
|
||||||
area = self.coordinator.data["door_window"][self.serial_number]["area"]
|
area = self.coordinator.data["door_window"][self.serial_number]["area"]
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": area,
|
name=area,
|
||||||
"suggested_area": area,
|
suggested_area=area,
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": "Shock Sensor Detector",
|
model="Shock Sensor Detector",
|
||||||
"identifiers": {(DOMAIN, self.serial_number)},
|
identifiers={(DOMAIN, self.serial_number)},
|
||||||
"via_device": (DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
via_device=(DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self) -> bool:
|
def is_on(self) -> bool:
|
||||||
@ -95,12 +96,13 @@ class VerisureEthernetStatus(CoordinatorEntity, BinarySensorEntity):
|
|||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this entity."""
|
"""Return device information about this entity."""
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": "Verisure Alarm",
|
name="Verisure Alarm",
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": "VBox",
|
model="VBox",
|
||||||
"identifiers": {(DOMAIN, self.coordinator.entry.data[CONF_GIID])},
|
identifiers={(DOMAIN, self.coordinator.entry.data[CONF_GIID])},
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self) -> bool:
|
def is_on(self) -> bool:
|
||||||
|
@ -70,14 +70,15 @@ class VerisureSmartcam(CoordinatorEntity, Camera):
|
|||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this entity."""
|
"""Return device information about this entity."""
|
||||||
area = self.coordinator.data["cameras"][self.serial_number]["area"]
|
area = self.coordinator.data["cameras"][self.serial_number]["area"]
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": area,
|
name=area,
|
||||||
"suggested_area": area,
|
suggested_area=area,
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": "SmartCam",
|
model="SmartCam",
|
||||||
"identifiers": {(DOMAIN, self.serial_number)},
|
identifiers={(DOMAIN, self.serial_number)},
|
||||||
"via_device": (DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
via_device=(DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
def camera_image(
|
def camera_image(
|
||||||
self, width: int | None = None, height: int | None = None
|
self, width: int | None = None, height: int | None = None
|
||||||
|
@ -79,14 +79,15 @@ class VerisureDoorlock(CoordinatorEntity, LockEntity):
|
|||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this entity."""
|
"""Return device information about this entity."""
|
||||||
area = self.coordinator.data["locks"][self.serial_number]["area"]
|
area = self.coordinator.data["locks"][self.serial_number]["area"]
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": area,
|
name=area,
|
||||||
"suggested_area": area,
|
suggested_area=area,
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": "Lockguard Smartlock",
|
model="Lockguard Smartlock",
|
||||||
"identifiers": {(DOMAIN, self.serial_number)},
|
identifiers={(DOMAIN, self.serial_number)},
|
||||||
"via_device": (DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
via_device=(DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
|
@ -74,14 +74,15 @@ class VerisureThermometer(CoordinatorEntity, SensorEntity):
|
|||||||
"deviceType"
|
"deviceType"
|
||||||
)
|
)
|
||||||
area = self.coordinator.data["climate"][self.serial_number]["deviceArea"]
|
area = self.coordinator.data["climate"][self.serial_number]["deviceArea"]
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": area,
|
name=area,
|
||||||
"suggested_area": area,
|
suggested_area=area,
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": DEVICE_TYPE_NAME.get(device_type, device_type),
|
model=DEVICE_TYPE_NAME.get(device_type, device_type),
|
||||||
"identifiers": {(DOMAIN, self.serial_number)},
|
identifiers={(DOMAIN, self.serial_number)},
|
||||||
"via_device": (DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
via_device=(DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self) -> str | None:
|
def native_value(self) -> str | None:
|
||||||
@ -127,14 +128,15 @@ class VerisureHygrometer(CoordinatorEntity, SensorEntity):
|
|||||||
"deviceType"
|
"deviceType"
|
||||||
)
|
)
|
||||||
area = self.coordinator.data["climate"][self.serial_number]["deviceArea"]
|
area = self.coordinator.data["climate"][self.serial_number]["deviceArea"]
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": area,
|
name=area,
|
||||||
"suggested_area": area,
|
suggested_area=area,
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": DEVICE_TYPE_NAME.get(device_type, device_type),
|
model=DEVICE_TYPE_NAME.get(device_type, device_type),
|
||||||
"identifiers": {(DOMAIN, self.serial_number)},
|
identifiers={(DOMAIN, self.serial_number)},
|
||||||
"via_device": (DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
via_device=(DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self) -> str | None:
|
def native_value(self) -> str | None:
|
||||||
@ -176,14 +178,15 @@ class VerisureMouseDetection(CoordinatorEntity, SensorEntity):
|
|||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this entity."""
|
"""Return device information about this entity."""
|
||||||
area = self.coordinator.data["mice"][self.serial_number]["area"]
|
area = self.coordinator.data["mice"][self.serial_number]["area"]
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": area,
|
name=area,
|
||||||
"suggested_area": area,
|
suggested_area=area,
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": "Mouse detector",
|
model="Mouse detector",
|
||||||
"identifiers": {(DOMAIN, self.serial_number)},
|
identifiers={(DOMAIN, self.serial_number)},
|
||||||
"via_device": (DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
via_device=(DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_value(self) -> str | None:
|
def native_value(self) -> str | None:
|
||||||
|
@ -49,14 +49,15 @@ class VerisureSmartplug(CoordinatorEntity, SwitchEntity):
|
|||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return device information about this entity."""
|
"""Return device information about this entity."""
|
||||||
area = self.coordinator.data["smart_plugs"][self.serial_number]["area"]
|
area = self.coordinator.data["smart_plugs"][self.serial_number]["area"]
|
||||||
return {
|
return DeviceInfo(
|
||||||
"name": area,
|
name=area,
|
||||||
"suggested_area": area,
|
suggested_area=area,
|
||||||
"manufacturer": "Verisure",
|
manufacturer="Verisure",
|
||||||
"model": "SmartPlug",
|
model="SmartPlug",
|
||||||
"identifiers": {(DOMAIN, self.serial_number)},
|
identifiers={(DOMAIN, self.serial_number)},
|
||||||
"via_device": (DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
via_device=(DOMAIN, self.coordinator.entry.data[CONF_GIID]),
|
||||||
}
|
configuration_url="https://mypages.verisure.com",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self) -> bool:
|
def is_on(self) -> bool:
|
||||||
|
Loading…
Reference in New Issue
Block a user