Skip to content

Add unit_of_measurement to climate and water_heater#6463

Draft
jhenkens wants to merge 1 commit intoesphome:nextfrom
jhenkens:current
Draft

Add unit_of_measurement to climate and water_heater#6463
jhenkens wants to merge 1 commit intoesphome:nextfrom
jhenkens:current

Conversation

@jhenkens
Copy link
Copy Markdown

@jhenkens jhenkens commented Apr 15, 2026

Description

Exposes temperature unit for climate and water_heater, with corresponding changes in home-assistant/core, aioesphome, esphome, and esphome-docs, to enable native Fahrenheit measurements on those entities. Usecase is to enable accurate temperature settings on a Fahrenheit hot tub, controlled via RS485-UART. Rather than round tripped from F -> C -> C, with various floating point errors and weirdnesses, this just makes it stay F the entire way and work much more reliably.

Tests still need to be added where appropriate - that's on the todo - but the code has been validated.

When esphome is updated, but core is not, as long as you do not set the temperature unit on a climate/water heater, everything works the same as it currently is. If you do set it, you will convert from F -> "F", as home assistant will think the incoming value from ESPHome is C, without reading the UOM. If ESPHome does not have F specified, it continues to default to C.

When HA is updated, but ESPHome is on an old version, it maintains legacy behavior of treating all climate/water_heaters as using C.

There are still some todo's, namely adding tests in every repo, and some other PR workitems, but the code is working and ready for early review.

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable):

home-assistant/core#168261
esphome/aioesphomeapi#1586
esphome/esphome#15740
#6463

Checklist

  • I am merging into next because this is new documentation that has a matching pull-request in esphome as linked above.
    or

  • I am merging into current because this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.

  • Link added in /src/content/docs/components/index.mdx when creating new documents for new components or cookbook.

New Component Images

If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.

To generate a component image:

  1. Comment on this pull request with the following command, replacing component_name with your component name in lower_case format with underscores (e.g., bme280, sht3x, dallas_temp):

    @esphomebot generate image component_name
    
  2. The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.

  3. Extract the SVG file and place it in the /public/images/ folder of this repository.

  4. Use the image in your component's index table entry in /src/content/docs/components/index.mdx.

Example: For a component called "DHT22 Temperature Sensor", use:

@esphomebot generate image dht22

Note: All images used in ImgTable components must be placed in /public/images/ as the component resolves them to absolute paths.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 15, 2026

Deploy Preview for esphome ready!

Name Link
🔨 Latest commit 6db5909
🔍 Latest deploy log https://app.netlify.com/projects/esphome/deploys/69dee6e0f7e3f20007bea541
😎 Deploy Preview https://deploy-preview-6463--esphome.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant