mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Use disabled_by constants (#49584)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -575,7 +575,7 @@ async def test_warn_disabled(hass, caplog):
|
||||
entity_id="hello.world",
|
||||
unique_id="test-unique-id",
|
||||
platform="test-platform",
|
||||
disabled_by="user",
|
||||
disabled_by=entity_registry.DISABLED_USER,
|
||||
)
|
||||
mock_registry(hass, {"hello.world": entry})
|
||||
|
||||
@@ -616,7 +616,9 @@ async def test_disabled_in_entity_registry(hass):
|
||||
await ent.add_to_platform_finish()
|
||||
assert hass.states.get("hello.world") is not None
|
||||
|
||||
entry2 = registry.async_update_entity("hello.world", disabled_by="user")
|
||||
entry2 = registry.async_update_entity(
|
||||
"hello.world", disabled_by=entity_registry.DISABLED_USER
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert entry2 != entry
|
||||
assert ent.registry_entry == entry2
|
||||
|
||||
Reference in New Issue
Block a user