Closed toth2zoltan closed 2 years ago
Hey there @fredericvl, mind taking a look at this issue as it has been labeled with an integration (saj
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
saj documentation saj source (message by IssueLinks)
sensor documentation sensor source (message by IssueLinks)
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
The problem
The initialisation process results the following error: Logger: homeassistant.components.sensor Source: components/saj/sensor.py:212 Integration: Sensor (documentation, issues) First occurred: 3:01:15 PM (2 occurrences) Last logged: 3:01:15 PM
Error adding entities for domain sensor with platform saj Error while setting up saj platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 525, in _async_add_entity original_device_class=entity.device_class, File "/usr/src/homeassistant/homeassistant/components/saj/sensor.py", line 212, in device_class if self.unit_of_measurement == POWER_WATT: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 375, in unit_of_measurement self.device_class == DEVICE_CLASS_TEMPERATURE File "/usr/src/homeassistant/homeassistant/components/saj/sensor.py", line 212, in device_class if self.unit_of_measurement == POWER_WATT: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 375, in unit_of_measurement self.device_class == DEVICE_CLASS_TEMPERATURE .... File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 375, in unit_of_measurement self.device_class == DEVICE_CLASS_TEMPERATURE File "/usr/src/homeassistant/homeassistant/components/saj/sensor.py", line 212, in device_class if self.unit_of_measurement == POWER_WATT: RecursionError: maximum recursion depth exceeded
The root cause of the error: In sensor/init.py the SensorEntity.unit_of_measurement calls device_class property In saj/sensor.py in the SAJsensor(SensorEntity) class the deviuce_class calls unit_of_measurement
What version of Home Assistant Core has the issue?
Home Assistant Core 2022.5.0b4
What was the last working version of Home Assistant Core?
never
What type of installation are you running?
Home Assistant Container
Integration causing the issue
SAJ
Link to integration documentation on our website
https://www.home-assistant.io/integrations/saj/#full-configuration-example-for-wi-fi-inverters
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response