Closed mnederlof closed 11 months ago
Please test if it works for you too before merging 😄
Traceback (most recent call last):
File "/Users/vincent/devel/home_assistant_enphase_envoy_installer/custom_components/enphase_envoy/envoy_reader.py", line 560, in <module>
class EnvoyReader:
File "/Users/vincent/devel/home_assistant_enphase_envoy_installer/custom_components/enphase_envoy/envoy_reader.py", line 1238, in EnvoyReader
battery_storage = _async_get_property("battery_storage")
TypeError: 'staticmethod' object is not callable
Traceback (most recent call last): File "/Users/vincent/devel/home_assistant_enphase_envoy_installer/custom_components/enphase_envoy/envoy_reader.py", line 560, in <module> class EnvoyReader: File "/Users/vincent/devel/home_assistant_enphase_envoy_installer/custom_components/enphase_envoy/envoy_reader.py", line 1238, in EnvoyReader battery_storage = _async_get_property("battery_storage") TypeError: 'staticmethod' object is not callable
That is weird, i did not encounter this issue, will test again, or do it differently...
I've moved the _async_get_property method out of the class. it should work better now :)
Added methods for backward compatibility (which fetches the data from the EnvoyData class)
Also renamed some properties to match the EntityDescription.key as defined in const.py
This also removes the
__getattr__
method from theEnvoyReader
class, making it a more straight forward class to read.