This commit is contained in:
proddy
2021-09-25 18:41:16 +02:00
parent 9e856b28a9
commit 84cc964a7a
5 changed files with 10 additions and 19 deletions

View File

@@ -130,13 +130,8 @@ Solar::Solar(uint8_t device_type, uint8_t device_id, uint8_t product_id, const s
register_device_value(TAG_NONE, &energyToday_, DeviceValueType::ULONG, nullptr, FL_(energyToday), DeviceValueUOM::WH);
register_device_value(TAG_NONE, &energyTotal_, DeviceValueType::ULONG, FL_(div10), FL_(energyTotal), DeviceValueUOM::KWH);
register_device_value(TAG_NONE,
&heatTransferSystem_,
DeviceValueType::BOOL,
nullptr,
FL_(heatTransferSystem),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_heatTransferSystem));
register_device_value(
TAG_NONE, &heatTransferSystem_, DeviceValueType::BOOL, nullptr, FL_(heatTransferSystem), DeviceValueUOM::NONE, MAKE_CF_CB(set_heatTransferSystem));
register_device_value(TAG_NONE, &externalTank_, DeviceValueType::BOOL, nullptr, FL_(externalTank), DeviceValueUOM::NONE, MAKE_CF_CB(set_externalTank));
register_device_value(
TAG_NONE, &thermalDisinfect_, DeviceValueType::BOOL, nullptr, FL_(thermalDisinfect), DeviceValueUOM::NONE, MAKE_CF_CB(set_thermalDisinfect));

View File

@@ -2504,8 +2504,7 @@ void Thermostat::register_device_values() {
TAG_DEVICE_DATA_WW, &wwProgMode_, DeviceValueType::ENUM, FL_(enum_wwProgMode), FL_(wwProgMode), DeviceValueUOM::NONE, MAKE_CF_CB(set_wwProgMode));
register_device_value(
TAG_DEVICE_DATA_WW, &wwCircProg_, DeviceValueType::ENUM, FL_(enum_wwProgMode), FL_(wwCircProg), DeviceValueUOM::NONE, MAKE_CF_CB(set_wwCircProg));
register_device_value(
TAG_DEVICE_DATA_WW, &wwDisinfect_, DeviceValueType::BOOL, nullptr, FL_(wwDisinfect), DeviceValueUOM::NONE, MAKE_CF_CB(set_wwDisinfect));
register_device_value(TAG_DEVICE_DATA_WW, &wwDisinfect_, DeviceValueType::BOOL, nullptr, FL_(wwDisinfect), DeviceValueUOM::NONE, MAKE_CF_CB(set_wwDisinfect));
register_device_value(TAG_DEVICE_DATA_WW,
&wwDisinfectDay_,
DeviceValueType::ENUM,

View File

@@ -1003,7 +1003,7 @@ void Mqtt::publish_ha_sensor(uint8_t type, // EMSdevice::Dev
snprintf(topic, sizeof(topic), "sensor/%s/%s/config", mqtt_base_.c_str(), uniq.c_str()); // topic
uint8_t set_state_class = 0;
enum uint8_t {MEASURE = 1, TOTAL};
enum uint8_t { MEASURE = 1, TOTAL };
// unit of measure and map the HA icon
if (uom != DeviceValueUOM::NONE) {
@@ -1053,11 +1053,8 @@ void Mqtt::publish_ha_sensor(uint8_t type, // EMSdevice::Dev
doc["ic"] = F_(icondbm);
break;
case DeviceValueUOM::NONE:
if (type == DeviceValueType::INT ||
type == DeviceValueType::UINT ||
type == DeviceValueType::SHORT ||
type == DeviceValueType::USHORT ||
type == DeviceValueType::ULONG) {
if (type == DeviceValueType::INT || type == DeviceValueType::UINT || type == DeviceValueType::SHORT || type == DeviceValueType::USHORT
|| type == DeviceValueType::ULONG) {
doc["ic"] = F_(iconnum);
set_state_class = TOTAL;
}

View File

@@ -1 +1 @@
#define EMSESP_APP_VERSION "v3.2.2b7"
#define EMSESP_APP_VERSION "3.2.2b8"