Clean up PumpSteer sensor attributes and expand diagnostics#197
Merged
JohanAlvedal merged 1 commit intocodex/01from Jan 20, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Motivation
sensor.pumpsteerså att UI visar endast användarvänliga fält och inte interna kontroll-/pris-/PI-variabler, samtidigt som full intern status görs tillgänglig via diagnostics för felsökning.Description
sensor.pumpsteerexponerar genom att förenkla_build_attributesicustom_components/pumpsteer/sensor/sensor.pyså att endast användarorienterade fält finns kvar (t.ex.mode,status,decision_reason,current_price,price_category,price_interval_minutes,target_temperature,indoor_temperature,outdoor_temperature,aggressiveness,inertia,holiday_mode,forecast_available,block_state,in_price_block,brake_offset_c).async_updateoch skickar denna vidare till diagnostics-samlingen istället för att lägga dem i UI-attribut.._get_decision_reason,._serialize_blockoch._serialize_block_windowför tydlig formatering av beslutstext och blockdata för diagnostics.custom_components/pumpsteer/diagnostics.pyför att returnerainternal_stateoch att redigera konfidentiella fält i config entry medredact_data(CONF_ACCESS_TOKEN,CONF_API_KEY,CONF_CLIENT_ID,CONF_CLIENT_SECRET,CONF_PASSWORD,CONF_TOKEN,CONF_USERNAME).tests/test_const.pyför den nya attributsignaturen och hjälpfunktionerna.Testing
pytestlokalt mot projektet; alla tester kördes och avslutade utan fel.pytest— 31 passed.Codex Task