Skip to content

Commit

Permalink
if configured, we trigger a manual update of uptime connection sensor…
Browse files Browse the repository at this point in the history
… on cycle end event
  • Loading branch information
echavet committed Apr 11, 2024
1 parent b025b28 commit eb62aa3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions components/cn105/hp_readings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ void CN105Climate::getDataFromResponsePacket() {
this->getPowerFromResponsePacket();
//FC 62 01 30 10 09 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 50
this->loopCycle.cycleEnded();

if (this->hp_uptime_connection_sensor_ != nullptr) {
// if the uptime connection sensor is configured
// we trigger manual update at the end of a cycle.
this->hp_uptime_connection_sensor_->update();
}

this->nbCompleteCycles_++;
break;

Expand Down
2 changes: 1 addition & 1 deletion esp32-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ climate:
debounce_delay : 100ms # delay to prevent bouncing
hp_uptime_connection_sensor:
name: ${name} HP Uptime Connection
update_interval: 60s
update_interval: 10s
supports:
mode: [COOL, HEAT, FAN_ONLY, DRY]
fan_mode: [AUTO, QUIET, LOW, MEDIUM, HIGH]
Expand Down

0 comments on commit eb62aa3

Please sign in to comment.