diff --git a/custom_components/bhyve/__init__.py b/custom_components/bhyve/__init__.py index c955cca..068e9ba 100644 --- a/custom_components/bhyve/__init__.py +++ b/custom_components/bhyve/__init__.py @@ -243,7 +243,7 @@ def device_class(self): return self._device_class @property - def device_state_attributes(self): + def extra_state_attributes(self): """Return the device state attributes.""" return self._attrs @@ -374,8 +374,10 @@ def update(device_id, data): """Update the state.""" event = data.get("event") if event == "device_disconnected": + _LOGGER.warning("Device {} disconnected and is no longer available".format(self.name)) self._available = False elif event == "device_connected": + _LOGGER.info("Device {} reconnected and is now available".format(self.name)) self._available = True if self._should_handle_event(event, data): _LOGGER.info( diff --git a/custom_components/bhyve/manifest.json b/custom_components/bhyve/manifest.json index 2990a04..bf8b5aa 100644 --- a/custom_components/bhyve/manifest.json +++ b/custom_components/bhyve/manifest.json @@ -1,6 +1,6 @@ { "domain": "bhyve", - "version": "2.1.0", + "version": "2.1.1", "name": "Orbit BHyve Integration", "documentation": "https://github.com/sebr/bhyve-home-assistant/blob/master/README.md", "dependencies": [], diff --git a/custom_components/bhyve/switch.py b/custom_components/bhyve/switch.py index eea6d35..a4c35d6 100644 --- a/custom_components/bhyve/switch.py +++ b/custom_components/bhyve/switch.py @@ -206,7 +206,7 @@ def __init__(self, hass, bhyve, program, device, icon): self._available = True @property - def device_state_attributes(self): + def extra_state_attributes(self): """Return the device state attributes.""" attrs = {