Add missing `unique_id` check for Shelly Analog Input sensor (#109888)

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
pull/109895/head
Maciej Bieniek 2024-02-07 18:20:53 +01:00 committed by GitHub
parent 8fd51fcbef
commit b276a7863b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -597,10 +597,14 @@ async def test_block_sleeping_update_entity_service(
async def test_rpc_analog_input_xpercent_sensor(
hass: HomeAssistant, mock_rpc_device
hass: HomeAssistant, mock_rpc_device, entity_registry
) -> None:
"""Test RPC analog input xpercent sensor."""
entity_id = f"{SENSOR_DOMAIN}.test_name_input_0_analog_value"
await init_integration(hass, 2)
assert hass.states.get(entity_id).state == "8.9"
entry = entity_registry.async_get(entity_id)
assert entry
assert entry.unique_id == "123456789ABC-input:0-analoginput_xpercent"