Add zwave_js node statistics sensors (#91714)
* Add node statistics sensors * fix tests and don't let controller state leak across tests * Add background RSSI * Remove extra logging statement * fix test * comments * setup platform once * Add static properties to entity description * Update homeassistant/components/zwave_js/sensor.py Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * don't dupe attribute values in entity description * fix exception --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
1e0770ff8a
commit
05c3d8bb37
6 changed files with 430 additions and 6 deletions
|
@ -963,7 +963,7 @@ async def test_removed_device(
|
|||
# Check how many entities there are
|
||||
ent_reg = er.async_get(hass)
|
||||
entity_entries = er.async_entries_for_config_entry(ent_reg, integration.entry_id)
|
||||
assert len(entity_entries) == 62
|
||||
assert len(entity_entries) == 91
|
||||
|
||||
# Remove a node and reload the entry
|
||||
old_node = driver.controller.nodes.pop(13)
|
||||
|
@ -975,7 +975,7 @@ async def test_removed_device(
|
|||
device_entries = dr.async_entries_for_config_entry(dev_reg, integration.entry_id)
|
||||
assert len(device_entries) == 2
|
||||
entity_entries = er.async_entries_for_config_entry(ent_reg, integration.entry_id)
|
||||
assert len(entity_entries) == 38
|
||||
assert len(entity_entries) == 60
|
||||
assert dev_reg.async_get_device({get_device_id(driver, old_node)}) is None
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue