mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-16 04:39:56 +03:00
fix #857, add class heatsource
This commit is contained in:
@@ -579,6 +579,7 @@ void EMSESP::publish_device_values(uint8_t device_type) {
|
||||
void EMSESP::publish_other_values() {
|
||||
publish_device_values(EMSdevice::DeviceType::SWITCH);
|
||||
publish_device_values(EMSdevice::DeviceType::HEATPUMP);
|
||||
publish_device_values(EMSdevice::DeviceType::HEATSOURCE);
|
||||
// other devices without values yet
|
||||
// publish_device_values(EMSdevice::DeviceType::GATEWAY);
|
||||
// publish_device_values(EMSdevice::DeviceType::CONNECT);
|
||||
@@ -986,9 +987,9 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
|
||||
for (auto & device : device_library_) {
|
||||
if (device.product_id == product_id) {
|
||||
// sometimes boilers share the same productID as controllers
|
||||
// so only add boilers if the device_id is 0x08 or 0x60 or 0x70.., which is fixed for EMS
|
||||
// so only add boilers if the device_id is 0x08 or 0x70.., which is fixed for EMS
|
||||
if (device.device_type == DeviceType::BOILER) {
|
||||
if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER || device_id == EMSdevice::EMS_DEVICE_ID_AM200
|
||||
if (device_id == EMSdevice::EMS_DEVICE_ID_BOILER
|
||||
|| (device_id >= EMSdevice::EMS_DEVICE_ID_BOILER_1 && device_id <= EMSdevice::EMS_DEVICE_ID_BOILER_F)) {
|
||||
device_p = &device;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user