Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not rename sensors warnings #135

Closed
rhammen opened this issue Sep 19, 2023 · 5 comments
Closed

Could not rename sensors warnings #135

rhammen opened this issue Sep 19, 2023 · 5 comments

Comments

@rhammen
Copy link
Contributor

rhammen commented Sep 19, 2023

2023-09-20 00:10:49.472 INFO (MainThread) [custom_components.luxtronik2] Connected to Luxtronik heatpump 192.168.1.190:8889
2023-09-20 00:10:49.492 WARNING (MainThread) [custom_components.luxtronik2] Could not rename entity sensor.luxtronik2_domestic_water_energy_input->sensor.luxtronik2_dhw_energy_input
File "/config/custom_components/luxtronik2/init.py", line 113, in _up
KeyError: 'sensor.luxtronik2_domestic_water_energy_input'
2023-09-20 00:10:49.502 WARNING (MainThread) [custom_components.luxtronik2] Could not rename entity binary_sensor.luxtronik2_domestic_water_charging_pump->binary_sensor.luxtronik2_dhw_charging_pump
File "/config/custom_components/luxtronik2/init.py", line 113, in _up
KeyError: 'binary_sensor.luxtronik2_domestic_water_charging_pump'

@BenPru
Copy link
Owner

BenPru commented Sep 27, 2023

From which version to which version have you updated?

@rhammen
Copy link
Contributor Author

rhammen commented Oct 5, 2023

From which version to which version have you updated?

I had updated HA from 2023.8.? to 2023.9.2 before installing the AlphaPreview.

I'm not 100% sure about the luxtronik2 version.
I made some modifications, especially in the climate.py
Looking at the file timestamps, I must have installed the luxtronik integration on 2023-02-02.
So It is likely the 2023.02.02 pre-release, otherwise the 2023.01.29 one.

@rhammen
Copy link
Contributor Author

rhammen commented Oct 5, 2023

Looking at the code of the 'old' integration, the sensor "domestic_water_energy_input" is only added conditionally:
add_sensor_if_min_minor_version(luxtronik, entities, 88, LuxtronikSensor(
So I do not have that sensor in my configuration since I am not use v3.88 but 3.79

Also the other sensor (luxtronik2_domestic_water_charging_pump) that reported the warning it could not be renamed does not exist in my configuration. This sensor is also only added if a specific condition is met.

Could the problem be that you don't check if the sensor exists before trying to rename it?

@BenPru
Copy link
Owner

BenPru commented Oct 7, 2023

Could the problem be that you don't check if the sensor exists before trying to rename it?

Yes, I change it.

BenPru added a commit that referenced this issue Oct 9, 2023
* Remove own translations - use ha entity translation
* Fix missing/hardcoded device_key in climate
* Fix some key_value UNSET warnings
@BenPru
Copy link
Owner

BenPru commented Oct 9, 2023

Should fixed with 2023.10.9-Alpha-Core-Preview

@BenPru BenPru closed this as completed Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants