Mobile app to update entity registry on re-register sensors (#58378)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
4e419d8c6f
commit
a122cbab61
6 changed files with 128 additions and 39 deletions
|
@ -11,6 +11,7 @@ from .const import (
|
|||
ATTR_DEVICE_NAME,
|
||||
ATTR_SENSOR_ATTRIBUTES,
|
||||
ATTR_SENSOR_DEVICE_CLASS,
|
||||
ATTR_SENSOR_ENTITY_CATEGORY,
|
||||
ATTR_SENSOR_ICON,
|
||||
ATTR_SENSOR_NAME,
|
||||
ATTR_SENSOR_STATE,
|
||||
|
@ -45,6 +46,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
ATTR_SENSOR_TYPE: entry.domain,
|
||||
ATTR_SENSOR_UNIQUE_ID: entry.unique_id,
|
||||
ATTR_SENSOR_UOM: entry.unit_of_measurement,
|
||||
ATTR_SENSOR_ENTITY_CATEGORY: entry.entity_category,
|
||||
}
|
||||
entities.append(MobileAppSensor(config, entry.device_id, config_entry))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue