Skip to content

Commit

Permalink
Fixed device attribute issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
twrecked committed Dec 13, 2021
1 parent 861635d commit 3a51eeb
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.7.4: Fix attributes issue.
0.7.3: Add percentage support to fan
Allow user to set availability of the device
0.7.2: Make virtual part of name optional
Expand All @@ -6,4 +7,3 @@
0.3: added locks
0.2: added device trackers
0.1: initial release

2 changes: 1 addition & 1 deletion custom_components/virtual/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import voluptuous as vol

__version__ = '0.7.3'
__version__ = '0.7.4'

_LOGGER = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/virtual/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def toggle(self):
self.turn_on()

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the device state attributes."""
attrs = {
'friendly_name': self._name,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/virtual/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def set_available(self, value):
self.async_schedule_update_ha_state()

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes."""

attrs = {
Expand Down
2 changes: 1 addition & 1 deletion custom_components/virtual/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def set_available(self, value):
self.async_schedule_update_ha_state()

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the device state attributes."""
attrs = {
'friendly_name': self._name,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/virtual/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"dependencies": [],
"codeowners": [ "@twrecked" ],
"requirements": [],
"version": "0.7.3",
"version": "0.7.4",
"iot_class": "local_push"
}
2 changes: 1 addition & 1 deletion custom_components/virtual/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def set_available(self, value):
self.async_schedule_update_ha_state()

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the device state attributes."""
attrs = {
'friendly_name': self._name,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/virtual/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def turn_off(self, **kwargs):
self._state = 'off'

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the device state attributes."""
attrs = {
'friendly_name': self._name,
Expand Down

0 comments on commit 3a51eeb

Please sign in to comment.