Fix regression in zwave_js (#69312)
* Handle unique ID update during discovery step * Use callback to convert unique IDs to strings * Adjust test to make sure logic works * Fix other tests * Move comment * Move migration to async_setup * Remove async_migrate_entry since we take care of it during setup * Remove unused test
This commit is contained in:
parent
add01d434e
commit
79dc551f5a
4 changed files with 21 additions and 33 deletions
|
@ -8,7 +8,6 @@ from zwave_js_server.exceptions import BaseZwaveJSServerError, InvalidServerVers
|
|||
from zwave_js_server.model.node import Node
|
||||
|
||||
from homeassistant.components.hassio.handler import HassioAPIError
|
||||
from homeassistant.components.zwave_js import async_migrate_entry
|
||||
from homeassistant.components.zwave_js.const import DOMAIN
|
||||
from homeassistant.components.zwave_js.helpers import get_device_id
|
||||
from homeassistant.config_entries import ConfigEntryDisabler, ConfigEntryState
|
||||
|
@ -1328,12 +1327,3 @@ async def test_disabled_entity_on_value_removed(hass, zp3111, client, integratio
|
|||
| {battery_level_entity, binary_cover_entity, sensor_cover_entity}
|
||||
== new_unavailable_entities
|
||||
)
|
||||
|
||||
|
||||
async def test_async_migrate_entry(hass):
|
||||
"""Test async_migrate_entry."""
|
||||
entry = MockConfigEntry(domain=DOMAIN, unique_id=123456789)
|
||||
assert isinstance(entry.unique_id, int)
|
||||
await async_migrate_entry(hass, entry)
|
||||
assert isinstance(entry.unique_id, str)
|
||||
assert entry.unique_id == "123456789"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue