esphome-docs icon indicating copy to clipboard operation
esphome-docs copied to clipboard

Round to significant digits filter

Open gapple opened this issue 2 months ago • 1 comments

Description:

New filter to round to significant digits, useful for sensors with a dynamic range of multiple orders of magnitude. e.g.

Original Value round_to_significant_digits: 2 round_to_significant_digits: 4
123456.789 120000 123500
123.4567 120 123.5
12.3456 12 12.35
1.23456 1.2 1.235
0.123456 0.12 0.1235

Related issue (if applicable): fixes

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

  • esphome/esphome#11157

Checklist:

  • [x] 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 /components/index.rst 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 UPPER_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 images/ folder of this repository.

  4. Use the image in your component's index table entry in /components/index.rst.

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

@esphomebot generate image DHT22

gapple avatar Oct 15 '25 23:10 gapple

Deploy Preview for esphome ready!

Name Link
Latest commit 7c60aa25a7b612f3c456b6bcc6b1ab0d4b9c9669
Latest deploy log https://app.netlify.com/projects/esphome/deploys/691ff9a0318b4f0008675ed0
Deploy Preview https://deploy-preview-5485--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.

netlify[bot] avatar Oct 15 '25 23:10 netlify[bot]