Use new zwave_js client (#45872)
* Use new zwave_js client * Remove client callbacks * Clean up on connect and on disconnect * Clean log * Add stop listen to unsubscribe callbacks * Fix most tests * Adapt to new listen interface * Fix most tests * Remove stale connection state feature * Bump zwave-js-server-python to 0.16.0 * Clean up disconnect
This commit is contained in:
parent
2e98cfb9ab
commit
524b9e7b1f
7 changed files with 104 additions and 130 deletions
|
@ -9,7 +9,6 @@ from zwave_js_server.model.value import Value as ZwaveValue, get_value_id
|
|||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from .const import DOMAIN
|
||||
|
@ -54,14 +53,6 @@ class ZWaveBaseEntity(Entity):
|
|||
self.info.node.on(EVENT_VALUE_UPDATED, self._value_changed)
|
||||
)
|
||||
|
||||
self.async_on_remove(
|
||||
async_dispatcher_connect(
|
||||
self.hass,
|
||||
f"{DOMAIN}_{self.config_entry.entry_id}_connection_state",
|
||||
self.async_write_ha_state,
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def device_info(self) -> dict:
|
||||
"""Return device information for the device registry."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue