Conversation
…roduction.md Co-authored-by: azebro <1090464+azebro@users.noreply.github.com>
docs: document sensor.tigo_max_power and Panel Power view in pv_production.md
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.
This pull request introduces a proactive midnight reset mechanism for daily energy sensors in the PyTap Home Assistant integration. The daily energy and readings sensors now zero out at exactly midnight local time, ensuring accurate daily totals even when no power reports arrive overnight (a common scenario for solar panels). The coordinator schedules and manages a midnight reset timer, updates documentation and dashboards to reflect these changes, and adds new tests to cover the reset logic.
Midnight Reset Feature:
_schedule_midnight_reset()and_perform_midnight_reset()methods toPyTapDataUpdateCoordinatorincoordinator.pyto schedule and execute a daily reset of energy accumulators at local midnight. The reset zeroesdaily_energy_whandreadings_todayfor all nodes, updates sensors, and reschedules itself for the next midnight. The timer is started on listener startup and cancelled on shutdown. [1] [2] [3] [4]README.mdanddocs/architecture.mdto document the proactive midnight reset behavior, replacing the previous lazy reset and clarifying timing semantics. [1] [2] [3] [4]Dashboard and Template Sensor Updates:
sensor.tigo_max_power) to visualize live power output per panel, with color scaling formulas and YAML anchors for power tiles. Increased panel count references from 24 to 26 throughout the documentation. [1] [2] [3] [4] [5]Documentation and Test Coverage:
Minor Code and Test Fixes:
sensor.pyfromkeytovalue_keyfor correct sensor value mapping.test_coordinator_persistence.pyto support new midnight reset tests. [1] [2] [3]