Closed barbudor closed 2 months ago
Hello @ascillato I know that you may not have time but just in case, what do you think of my proposal to remove that configuration check ? I think it would be better as it allows to use any T& H sensor, including I2C ones Thanks
Hello,
what do you think of my proposal to remove that configuration check ? I think it would be better as it allows to use any T& H sensor, including I2C ones
I wouldn't remove the whole check. I think, we should add the new sensor types you added to the driver instead. The check is mainly to not mix the config when changing the module type. Without this check, in the case an user adds a KNX config and then decides to change the module type to a template or whatever, the config will be scrambled and the only solution is a full reset.
So, I think we should just add to that check the new types. What do you think?
I would not be able to do that these days since I'm not at home but I can look into any change you propose.
It is not possible to add a check for sensors that will be detected later in the process such as i2c sensors There's no way at that time to know if a i2c T/H sensor is present
I would compare that to Tasmota fully erasing it's configuration is the user configure a DS18X20 and then the DS driver doesn't find the sensor
I will revert to your previous code but it's a pity if KNX couldn't work with i2c sensors
@ascillato could you please provide a scénario where not having such test would be a problem ?
Except for the format of Energy payload, I reverted to the orginal code from @ascillato including the configuration check and the limitation to only some temperature and humidity sensors
That should be good to merge now
Thanks Theo
Hi @barbudor. I've tested the latest commits on my ESP32 + DHT11 enabled. it seems to work as expected. The KNX configuration is persistant after the restart. Thanks.
Description:
Related issue (if applicable): fixes https://github.com/arendst/Tasmota/issues/21379 (initially reported here https://github.com/arendst/Tasmota/issues/20834#issuecomment-2096809259)
This restore the way @ascillato was testing the KNX configuration against some sensors enabled.
Solve the above issue but prevent to use any temperature or humidity sensor than those listed, excluding also all I2C sensors.
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass