esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
406 stars 26 forks source link

Add Humidity to Climate Component #2306

Closed Daniel-dev22 closed 7 months ago

Daniel-dev22 commented 1 year ago

Describe the problem you have/What new integration you would like

The climate component currently lacks the ability to set current humidity % or set target humidity %.

The climate component in home assistant already supports both. All esphome would have to do is provide these settings optionally for those with humidifiers or dehumidifiers.

Please describe your use case for this integration and alternatives you've tried:

The alternative is to use a separate sensor for current humidity and a number component for target humidity which is not ideal for UX.

Additional context

Weissnix4711 commented 8 months ago

Duplicate of #1132 and #533 though those have been closed and locked for some reason.

As mentioned in #1132, Home Assistant seems to have the support for humidity climate components, but that is not reflected in ESPHome.

From a quick scan of the code base, we would need to update APIConnection::send_climate_state to send humidity values instead, if configured so.

https://github.com/esphome/esphome/blob/05a95f8ee9f390deab5fca5e4c136fb820b25c6a/esphome/components/api/api_connection.cpp#L519

Also, ClimateStateResponse would need to be updated.

https://github.com/esphome/esphome/blob/05a95f8ee9f390deab5fca5e4c136fb820b25c6a/esphome/components/api/api_pb2.h#L987

https://github.com/esphome/esphome/blob/05a95f8ee9f390deab5fca5e4c136fb820b25c6a/esphome/components/api/api.proto#L856

And obviously all the python code that generates our cpp.