Closed rhammen closed 1 year ago
I can confirm this issue, I have the same temperature readings.
It appears that detect_solar_present() is not used (temporarily disabled) for the solar parameters in sensor.py Instead a separate detection based on the visibilities is used... This made trying out things a bit confusing... In my local setup I now re-enabled usage of detect_solar_present(), and used this:
def detect_solar_present(self):
sensor_value = self.get_value(LUX_DETECT_SOLAR_SENSOR)
solar_koll = self.get_value("calculations.ID_WEB_Temperatur_TSK")
solar_buffer = self.get_value("calculations.ID_WEB_Temperatur_TSS")
working_hours = self.get_value("parameters.ID_BSTD_Solar")
SolarPresent = (sensor_value > 0 or working_hours > 0.01 or solar_koll !=5 or solar_buffer != 150)
LOGGER.info(f"{sensor_value}, WH={working_hours}, solar_koll={solar_koll}, solar_buffer={solar_buffer}")
LOGGER.info(f"SolarPresent = {SolarPresent}")
return SolarPresent
This way the solar sensors are not not added to my local setup.
It indeed looks like detecting options based on visibilities doesn't work reliably.
Maybe make the check based on default temperatures an and condition:
SolarPresent = (sensor_value > 0 or working_hours > 0.01 or (solar_koll != 5 and solar_buffer != 150))
I use more and more the original luxtronik visibilities. But it seems that many heatpumps has a wrong visibility config. I have changed the behavior in the latest pre-release 2023.01.25. Currently I'm focusing on the new code base, but I try to implement those "specials": https://github.com/BenPru/luxtronik/blob/core-preview/custom_components/luxtronik/coordinator.py#L356
HA now reports that I have
I think this changed * Optimize solar detection caused this. The values in my case (where there is no solar buffer): Solar Collector = 5.0 C Solar Buffer = 150.0 C
The OR function in line 159 then triggers the detection:
SolarPresent = (sensor_value > 0 or working_hours > 0.01 or solar_koll > 0 or solar_buffer > 0)
Can we change this to:SolarPresent = (sensor_value > 0 or working_hours > 0.01)
or if that causes problem to something like:SolarPresent = (sensor_value > 0 or working_hours > 0.01 or solar_koll !=5 or solar_buffer != 150)