Commit Graph
4 Commits
Author SHA1 Message Date
constantin b746268616 updating workflow 2026-05-12 13:12:22 +03:00
constantin eb9827175e updating the workflow 2026-05-12 13:12:22 +03:00
constantin 19d1079eea adding workflow 2026-05-12 11:08:44 +03:00
constantin 0b284bda4d Fix relay not turning off after integration restart
On restart, pv_state resets to IDLE so the computed decision is always
  False on the first recalculate. Comparing against self.decision (also
  False) meant relay_control was never called, leaving the relay physically
  ON past the PV target and cut-off temperature limits.

  - Compare decision against the actual relay_on state instead of the
    coordinator's previous self.decision, so any discrepancy (including
    one left by a restart or an external integration) is corrected
    immediately on every recalculate.
  - Call _recalculate() at the end of async_setup() so the relay is synced
    on startup without waiting for an external state-change event.

  Co-Authored-By: Claude
2026-05-12 10:24:45 +03:00