mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
more weather compensation entities #1642
This commit is contained in:
@@ -245,6 +245,19 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveOn_, DeviceValueType::BOOL, FL_(curveOn), DeviceValueUOM::NONE, MAKE_CF_CB(set_curveOn));
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveOn_, DeviceValueType::BOOL, FL_(curveOn), DeviceValueUOM::NONE, MAKE_CF_CB(set_curveOn));
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveBase_, DeviceValueType::UINT, FL_(curveBase), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_curveBase));
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveBase_, DeviceValueType::UINT, FL_(curveBase), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_curveBase));
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveEnd_, DeviceValueType::UINT, FL_(curveEnd), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_curveEnd));
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &curveEnd_, DeviceValueType::UINT, FL_(curveEnd), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_curveEnd));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
|
&summerTemp_,
|
||||||
|
DeviceValueType::UINT,
|
||||||
|
FL_(summertemp),
|
||||||
|
DeviceValueUOM::DEGREES,
|
||||||
|
MAKE_CF_CB(set_summerTemp));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nofrost_, DeviceValueType::BOOL, FL_(nofrostmode), DeviceValueUOM::NONE, MAKE_CF_CB(set_nofrost));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
|
&nofrostTemp_,
|
||||||
|
DeviceValueType::UINT,
|
||||||
|
FL_(nofrosttemp),
|
||||||
|
DeviceValueUOM::DEGREES,
|
||||||
|
MAKE_CF_CB(set_nofrostTemp));
|
||||||
}
|
}
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
|
||||||
&heatingActivated_,
|
&heatingActivated_,
|
||||||
@@ -2004,6 +2017,9 @@ void Boiler::process_WeatherComp(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram, curveOn_, 0);
|
has_update(telegram, curveOn_, 0);
|
||||||
has_update(telegram, curveEnd_, 1);
|
has_update(telegram, curveEnd_, 1);
|
||||||
has_update(telegram, curveBase_, 2);
|
has_update(telegram, curveBase_, 2);
|
||||||
|
has_update(telegram, summerTemp_, 3);
|
||||||
|
has_update(telegram, nofrost_, 4);
|
||||||
|
has_update(telegram, nofrostTemp_, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
// HIU Settings
|
// HIU Settings
|
||||||
@@ -3176,4 +3192,31 @@ bool Boiler::set_curveEnd(const char * value, const int8_t id) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Boiler::set_summerTemp(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2temperature(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x28, 3, v);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Boiler::set_nofrost(const char * value, const int8_t id) {
|
||||||
|
bool v;
|
||||||
|
if (Helpers::value2bool(value, v)) {
|
||||||
|
write_command(0x28, 4, v ? 0xFF : 0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Boiler::set_nofrostTemp(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2temperature(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x28, 5, v);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace emsesp
|
} // namespace emsesp
|
||||||
|
|||||||
@@ -159,6 +159,9 @@ class Boiler : public EMSdevice {
|
|||||||
uint8_t curveOn_;
|
uint8_t curveOn_;
|
||||||
uint8_t curveBase_;
|
uint8_t curveBase_;
|
||||||
uint8_t curveEnd_;
|
uint8_t curveEnd_;
|
||||||
|
uint8_t summerTemp_;
|
||||||
|
uint8_t nofrost_;
|
||||||
|
uint8_t nofrostTemp_;
|
||||||
|
|
||||||
// info
|
// info
|
||||||
uint32_t upTimeTotal_; // Operating time
|
uint32_t upTimeTotal_; // Operating time
|
||||||
@@ -532,6 +535,9 @@ class Boiler : public EMSdevice {
|
|||||||
bool set_curveOn(const char * value, const int8_t id);
|
bool set_curveOn(const char * value, const int8_t id);
|
||||||
bool set_curveBase(const char * value, const int8_t id);
|
bool set_curveBase(const char * value, const int8_t id);
|
||||||
bool set_curveEnd(const char * value, const int8_t id);
|
bool set_curveEnd(const char * value, const int8_t id);
|
||||||
|
bool set_summerTemp(const char * value, const int8_t id);
|
||||||
|
bool set_nofrost(const char * value, const int8_t id);
|
||||||
|
bool set_nofrostTemp(const char * value, const int8_t id);
|
||||||
|
|
||||||
bool set_nrgHeat(const char * value, const int8_t id);
|
bool set_nrgHeat(const char * value, const int8_t id);
|
||||||
bool set_nrgWw(const char * value, const int8_t id);
|
bool set_nrgWw(const char * value, const int8_t id);
|
||||||
|
|||||||
Reference in New Issue
Block a user