Update 2024.03.01 dab pump
Deedzy opened this issue · 6 comments
I see the shower power and sleep mode but everything else is unavailable.
Core
2024.2.5
Supervisor
2024.02.1
Operating System
12.0
Frontend
20240207.1
Log
Error while setting up dabpumps platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/dabpumps/sensor.py", line 56, in async_setup_entry
await helper.async_setup_entry(Platform.SENSOR, DabPumpsSensor, async_add_entities)
File "/config/custom_components/dabpumps/entity_base.py", line 157, in async_setup_entry
entity = target_class(self.coordinator, self.install_id, object_id, device, params, status)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dabpumps/sensor.py", line 70, in init
DabPumpsEntity.init(self, params)
File "/config/custom_components/dabpumps/entity_base.py", line 247, in init
self._attr_unit = self._convert_to_unit()
^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dabpumps/entity_base.py", line 286, in _convert_to_unit
return params.unit
^^^^^^
NameError: name 'params' is not defined
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Thank you for reporting this issue so quickly, it is in a couple of lines of code that I do not need for my pump (ESybox), but that are used for other ones (ESybox.mini?). Therefore it is harder for me to spot issues there.
I've fixed the issue and immediately published it as new release v2024.03.2.
@Deedzy
These same couple of lines of code will also log a (non fatal) warning:
"DAB Pumps encountered a unit or measurement '{unit}' for '{sensor}' that may not be supported by Home Assistant. Please contact the integration developer to have this resolved."
Could you please have a look if you can find this warning in the log, I would be interested what the unit of measurement is that is used by your pump, but not yet supported in my code
Log Details (WARNING)
Logger: homeassistant.components.sensor
Source: components/sensor/init.py:576
Integration: Sensor (documentation, issues)
First occurred: 9:00:08 am (4 occurrences)
Last logged: 9:00:08 am
Entity sensor.esybox_mini_v3_last_period_flow_counter (<class 'custom_components.dabpumps.sensor.DabPumpsSensor'>) is using state class 'measurement' which is impossible considering device class ('water') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/ankohanse/hass-dab-pumps/issues
Entity sensor.esybox_mini_v3_last_period_energy_counter (<class 'custom_components.dabpumps.sensor.DabPumpsSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/ankohanse/hass-dab-pumps/issues
Entity sensor.esybox_mini_v3_totalenergy (<class 'custom_components.dabpumps.sensor.DabPumpsSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/ankohanse/hass-dab-pumps/issues
Entity sensor.esybox_mini_v3_partialenergy (<class 'custom_components.dabpumps.sensor.DabPumpsSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/ankohanse/hass-dab-pumps/issues
Log Details (WARNING)
This error originated from a custom integration.
Logger: custom_components.dabpumps.entity_base
Source: custom_components/dabpumps/entity_base.py:285
Integration: DAB Pumps (documentation, issues)
First occurred: 9:00:08 am (1 occurrences)
Last logged: 9:00:08 am
DAB Pumps encountered a unit or measurement 'min' for 'ET_ExchangeTime' that may not be supported by Home Assistant. Please contact the integration developer to have this resolved.
Thanks for that, I've adapeted the code to resolve these warnings. Will be published later next week as v2024.03.3
The data isn't updating? No errors