Add support to entity registry for overriding device_class (#59985)

This commit is contained in:
Erik Montnemery 2021-11-22 17:38:06 +01:00 committed by GitHub
parent 67e13b35db
commit 49a27e12ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 136 additions and 69 deletions

View file

@ -136,7 +136,7 @@ async def test_init_shutterbox(shutterbox, hass, config):
state = hass.states.get(entity_id)
assert state.name == "shutterBox-position"
assert entry.device_class == DEVICE_CLASS_SHUTTER
assert entry.original_device_class == DEVICE_CLASS_SHUTTER
supported_features = state.attributes[ATTR_SUPPORTED_FEATURES]
assert supported_features & SUPPORT_OPEN