Browse Source

thermostat: zones: update m_heating_on

master
rico rico 4 years ago
parent
commit
5be8c40968
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      soft/thermostat/src/mainwindow.cpp

+ 2
- 2
soft/thermostat/src/mainwindow.cpp View File

@ -206,14 +206,14 @@ void MainWindow::apply_automatic_state(void)
qDebug() << "apply auto state";
for (i = 0; i < s->m_rooms.count(); i++) {
const struct Room *r = &(s->m_rooms.at(i));
bool should_heat = get_heater_order(i);
m_zones.at(i)->m_heating_on = get_heater_order(i);
qDebug() << "room " << r->name;
for (int j = 0; j < r->heaters.count(); j++) {
const struct Heater *h = &(r->heaters.at(j));
qDebug() << "heater " << h->ctrl_topic;
/* TODO: check if connected */
m_mqtt->publish_msg(h->ctrl_topic,
should_heat ? "on" : "off");
m_zones.at(i)->m_heating_on ? "on" : "off");
}
}
}


Loading…
Cancel
Save