Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bramstroker committed Aug 5, 2022
1 parent bd59ded commit 4ac1390
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_sensor.py
Expand Up @@ -395,6 +395,10 @@ async def test_include_light_group(hass: HomeAssistant):
assert group_state.attributes.get(ATTR_ENTITIES) == {"sensor.bathroom_mirror_power"}

async def test_user_can_rename_entity_id(hass: HomeAssistant, entity_reg: EntityRegistry):
"""
When the power/energy sensors exist already with an unique ID, don't change the entity ID
This allows the users to change the entity ID's from the GUI
"""
entity_reg.async_get_or_create("sensor", DOMAIN, "abcdef", suggested_object_id="my_renamed_power")
entity_reg.async_get_or_create("sensor", DOMAIN, "abcdef_energy", suggested_object_id="my_renamed_energy")
await hass.async_block_till_done()
Expand Down

0 comments on commit 4ac1390

Please sign in to comment.