Closed ei-ke closed 2 years ago
From the log:
2021-12-20 11:22:15 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.attnode_001_v (<class 'custom_components.thethingsnetwork.TTN_client.TtnDataSensor'>) implements device_state_attributes. Please report it to the custom component author.
I've changed def device_state_attributes(self) -> Optional[Dict[str, Any]]: to def extra_state_attributes(self) -> Optional[Dict[str, Any]]: on L469
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
def extra_state_attributes(self) -> Optional[Dict[str, Any]]:
Not sure if that's the solution, but the warning is gone.
Likely device_state_attributes has been deprecated in favor of extra_state_attributes.
Will take your change - thanks!
Fixed with https://github.com/angelnu/home_assistant_thethingsnetwork/commit/6b034c1da40caa2ecc8dfb8089da2c5a1b4a57a8
From the log:
I've changed
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
todef extra_state_attributes(self) -> Optional[Dict[str, Any]]:
on L469Not sure if that's the solution, but the warning is gone.