Skip to content

Commit

Permalink
Merge pull request #95 from sebr/develop
Browse files Browse the repository at this point in the history
2.1.1
  • Loading branch information
sebr authored Dec 15, 2021
2 parents d8a269a + bbd4e3c commit 68a7ace
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion custom_components/bhyve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion custom_components/bhyve/manifest.json
Original file line number Diff line number Diff line change
@@ -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": [],
Expand Down
2 changes: 1 addition & 1 deletion custom_components/bhyve/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 68a7ace

Please sign in to comment.