rebaseline #46
Merged
Merged
Conversation
Version 2025.7.6 update
modified: README.md modified: custom_components/utility_meter_next_gen/__init__.py modified: custom_components/utility_meter_next_gen/config_flow.py modified: custom_components/utility_meter_next_gen/const.py modified: custom_components/utility_meter_next_gen/manifest.json modified: custom_components/utility_meter_next_gen/schemas.py modified: custom_components/utility_meter_next_gen/sensor.py modified: custom_components/utility_meter_next_gen/strings.json modified: custom_components/utility_meter_next_gen/translations/en.json
modified: custom_components/utility_meter_next_gen/config_flow.py modified: custom_components/utility_meter_next_gen/schemas.py modified: custom_components/utility_meter_next_gen/sensor.py modified: custom_components/utility_meter_next_gen/strings.json modified: custom_components/utility_meter_next_gen/translations/en.json
Multi Predefined recycle Meters Feature Code
modified: custom_components/utility_meter_next_gen/config_flow.py modified: custom_components/utility_meter_next_gen/manifest.json modified: custom_components/utility_meter_next_gen/schemas.py modified: custom_components/utility_meter_next_gen/sensor.py
Bug Fixes
modified: custom_components/utility_meter_next_gen/manifest.json
Changes to be committed:
modified: custom_components/utility_meter_next_gen/manifest.json modified: custom_components/utility_meter_next_gen/sensor.py
Multi period calculation bug fix
modified: custom_components/utility_meter_next_gen/manifest.json modified: custom_components/utility_meter_next_gen/sensor.py
Bug Fixes for Calculation sensor value not surviving HA restarts
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.12.2 to 0.12.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.12.2...0.12.3) --- updated-dependencies: - dependency-name: ruff dependency-version: 0.12.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
modified: custom_components/utility_meter_next_gen/manifest.json modified: custom_components/utility_meter_next_gen/sensor.py
modified: custom_components/utility_meter_next_gen/sensor.py
Tariff Total - miscalculating
modified: README.md
About Readme
Update dependency ruff to v0.12.3
Bump ruff from 0.12.2 to 0.12.3
Reviewer's GuideThis PR rebases and extends the utility_meter_next_gen integration by introducing multi-meter (multi-predefined cycle) support, refactoring sensor setup to loop over selected meter types with per-cycle calibration application, persisting and exposing calculated values in both primary and calculated sensors, and updating configuration flows, schemas, constants, and documentation to expose the new multi-meter feature. ER diagram for multi-meter type configuration and calibration applicationerDiagram
CONFIG_ENTRY {
string CONF_METER_TYPE
string CONF_TARIFFS
decimal CONF_CONFIG_CALIBRATE_VALUE
decimal CONF_CONFIG_CALIBRATE_CALC_VALUE
string CONF_CONFIG_CALIBRATE_APPLY
string CONF_CONFIG_CALIBRATE_CALC_APPLY
}
UTILITY_METER_SENSOR {
string meter_type
string tariff
decimal calibrate_value
decimal calibrate_calc_value
}
CONFIG_ENTRY ||--o{ UTILITY_METER_SENSOR : "creates sensors for each meter_type/tariff"
CONFIG_ENTRY ||--|| UTILITY_METER_SENSOR : "applies calibration per selected cycle via *_APPLY fields"
Class diagram for updated Utility Meter sensor types and calibration logicclassDiagram
class UtilityMeterSensor {
- Decimal _calibrate_value
- Decimal _calibrate_calc_value
- Decimal _attr_calculated_current_value
- Decimal _attr_calculated_last_value
+ __init__(...)
+ start(...)
+ async_reading(...)
+ async_reset_meter(...)
+ async_added_to_hass(...)
+ extra_state_attributes()
+ extra_restore_state_data()
+ async_get_last_sensor_data()
}
class UtilityMeterCalculatedSensor {
- Decimal _calibrate_calc_value
+ __init__(...)
+ start(...)
+ async_added_to_hass(...)
+ extra_state_attributes()
}
class UtilitySensorExtraStoredData {
+ Decimal|None calculated_current_value
+ Decimal|None calculated_last_value
+ as_dict()
+ from_dict(...)
}
UtilityMeterSensor --|> RestoreSensor
UtilityMeterCalculatedSensor --|> RestoreSensor
UtilityMeterSensor --> UtilitySensorExtraStoredData : uses for state restore
UtilityMeterCalculatedSensor --> UtilityMeterSensor : links via ATTR_LINKED_METER
Class diagram for configuration flow and schema changes (multi-meter support)classDiagram
class UtilityMeterEvolvedCustomConfigFlow {
+ async_step_user(...)
+ async_step_cron(...)
+ async_step_predefined(...)
+ async_step_multi_step_1(...)
+ async_step_multi_step_2(...)
}
class OptionsFlowHandler {
+ async_step_init(...)
+ async_multi_option_step_2(...)
}
class Schemas {
+ create_multi_config_schema_step_1(...)
+ create_multi_config_schema_step_2(...)
+ create_multi_option_schema_step_1(...)
+ create_multi_option_schema_step_2(...)
}
UtilityMeterEvolvedCustomConfigFlow --> Schemas : uses
OptionsFlowHandler --> Schemas : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Related Issues
Summary by Sourcery
Extend the Utility Meter Next Gen integration to support a new “multi” configuration type for creating multiple period meters (with optional tariffs and calculation sensors) in one flow, add per-cycle calibration application options, enhance sensor state tracking and attributes, and update config schemas and flows accordingly.
New Features:
Enhancements:
Build:
Documentation: