Closed devildant closed 2 months ago
I think it's a small oversight on line 530 in climate.py, you activate the feature even if _template_target_humidity is not defined.
maybe fix like that :
if HVACMode.DRY in self._attr_hvac_modes:
if self._template_target_humidity:
self._attr_supported_features |= ClimateEntityFeature.TARGET_HUMIDITY
I tested successfully but I'm not sure, with your presets_features option (I don't use it)
Hello, it is actually not that simple. There are two ways ho to set target humidity:
So the fact, that humidity template is not defined doesn't mean, that someone is not using HA to set humidity. So far the logic was: if there is DRY mode in hvac mode then we suppose, that target humidity could be set, While I understand, that some devices might have DRY mode, but not allow to set target humidity (for example some AC units), then what you propose would be more limiting to users, who need this functionality and will not be able to use it, if they do not use template to set target humidity (which is not always the case).
So proposed way would be to implement whole condition:
if (
self._action_humidity
or self._template_target_humidity
or self._presets_features & ClimateEntityPresetFeature.TARGET_HUMIDITY
):
self._attr_supported_features |= ClimateEntityFeature.TARGET_HUMIDITY
else:
_LOGGER.info(
The same logic should be implemented for TARGET_TEMPERATURE as well. I will evaluate this and if it would be OK I will implement this in the next release.
Hello, it is actually not that simple. There are two ways ho to set target humidity:
- via template
- via HA GUI
So the fact, that humidity template is not defined doesn't mean, that someone is not using HA to set humidity. So far the logic was: if there is DRY mode in hvac mode then we suppose, that target humidity could be set, While I understand, that some devices might have DRY mode, but not allow to set target humidity (for example some AC units), then what you propose would be more limiting to users, who need this functionality and will not be able to use it, if they do not use template to set target humidity (which is not always the case).
So proposed way would be to implement whole condition:
if ( self._action_humidity or self._template_target_humidity or self._presets_features & ClimateEntityPresetFeature.TARGET_HUMIDITY ): self._attr_supported_features |= ClimateEntityFeature.TARGET_HUMIDITY else: _LOGGER.info(
The same logic should be implemented for TARGET_TEMPERATURE as well. I will evaluate this and if it would be OK I will implement this in the next release.
your condition seems to me more complete. it was at least to give a quick forward, and help a little with the resolution.
I suspected my solution was a bit lightweight. that's why I didn't do a "PR" +1 for apply same logcal for the temperature
hello, fixed in this branch, please copy climate.py, restart HA test and report back please. Thank you.
hello, fixed in this branch, please copy climate.py, restart HA test and report back please. Thank you.
👍
Released in 0.7.2
The problem
Hi, I hadn't paid attention but I have the option to define the target humidity, however I don't have this option on my air conditioner, how can I remove this option from the thermostat ha?
What version of Template Climate has the issue?
0.7.1
What version of Home Assistant are you running?
2024.6.3
What type of installation are you running?
Home Assistant OS
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response