Skip to content

Conversation

@almottier
Copy link

Breaking change

N/A - This is a new feature, not a breaking change.

Proposed change

This PR adds an optional precision configuration parameter that allows users to control the number of decimal places displayed for the apparent temperature sensor value.

Users can now customize the display precision from 0 to 6 decimal places based on their preference. If not specified, the default is 1 decimal place. Users who want more precision can configure a higher value (e.g., precision: 2 for two decimal places).

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an this integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
sensor:
  # Use default precision (1 decimal place)
  - platform: apparent_temperature
    source: weather.home

  # Custom precision - 2 decimal places
  - platform: apparent_temperature
    name: 'Basement Feels Like Temperature'
    precision: 2  # Display 2 decimal places (e.g., 20.45°C)
    source:
      - sensor.basement_temperature
      - sensor.basement_humidity

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • The code has been formatted using Black (black --fast custom_components)

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated to README.md

@almottier almottier marked this pull request as ready for review December 5, 2025 02:54
@almottier almottier mentioned this pull request Dec 5, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rounding value

1 participant