mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-30 04:24:28 +02:00
Replaced device_state_attributes for extra_state_attributes, fixes #152
This commit is contained in:
parent
572ce4eebe
commit
e10ab3e0ee
4 changed files with 10 additions and 10 deletions
|
@ -308,7 +308,7 @@ class MikrotikControllerSwitch(SwitchEntity, RestoreEntity):
|
|||
return self._data["enabled"]
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes."""
|
||||
attributes = self._attrs
|
||||
|
||||
|
@ -348,7 +348,7 @@ class MikrotikControllerPortSwitch(MikrotikControllerSwitch):
|
|||
return f"{self._inst.lower()}-enable_switch-{self._data['port-mac-address']}_{self._data['default-name']}"
|
||||
|
||||
@property
|
||||
def device_state_attributes(self) -> Dict[str, Any]:
|
||||
def extra_state_attributes(self) -> Dict[str, Any]:
|
||||
"""Return the state attributes."""
|
||||
attributes = self._attrs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue