-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ParameterParser KeyError during init
- Loading branch information
1 parent
81ddf2b
commit 75a6809
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75a6809
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is now working, but I am not getting any data displayed.
75a6809
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.solarman.sensor
Quelle: custom_components/solarman/sensor.py:48
Integration: Solarman (Dokumentation, Probleme)
Erstmals aufgetreten: 15:52:00 (7 Vorkommnisse)
Zuletzt protokolliert: 15:56:45
Configuring {'name': 'Battery SOH', 'class': '', 'state_class': 'measurement', 'uom': '%', 'scale': 1, 'rule': 1, 'registers': [1545], 'icon': 'mdi:battery'} failed. [TypeError: '<=' not supported between instances of 'NoneType' and 'int']
75a6809
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger: homeassistant.components.sensor
Quelle: helpers/entity_platform.py:372
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 15:52:00 (7 Vorkommnisse)
Zuletzt protokolliert: 15:56:45
Error while setting up solarman platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 372, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 631, in async_add_entities
for entity in new_entities:
File "/config/custom_components/solarman/sensor.py", line 66, in
async_add_entities(_create_sensor(coordinator, sensor, battery_nominal_voltage, battery_life_cycle_rating) for sensor in sensors if ((not "class" in sensor or not sensor["class"] in PLATFORMS) and not "configurable" in sensor))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solarman/sensor.py", line 44, in _create_sensor
entity.update()
File "/config/custom_components/solarman/sensor.py", line 110, in update
if battery_capacity <= 0:
^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
75a6809
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you are not using latest version of the code in the repo.
You did the adjustments from this commit manually?
75a6809
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But in the meanwhile I also noticed another bug which i promptly fixed in: fix: Custom BatterySensor only when missing registers property