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:
Paulus Schoutsen 2021-10-31 20:21:46 -07:00 committed by GitHub
parent 4e419d8c6f
commit a122cbab61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 128 additions and 39 deletions

View file

@ -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))