Skip to content

Commit

Permalink
3.2.2b8
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 25, 2021
1 parent 9e856b2 commit 84cc964
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,9 @@ void Boiler::process_UBAErrorMessage2(std::shared_ptr<const Telegram> telegram)
if (telegram->offset > 0 || telegram->message_length < 14) {
return;
}
char code[4];
uint16_t codeNo;
uint32_t timecode;
char code[4];
uint16_t codeNo;
uint32_t timecode;
code[0] = telegram->message_data[5];
code[1] = telegram->message_data[6];
code[2] = telegram->message_data[7];
Expand Down
9 changes: 2 additions & 7 deletions src/devices/solar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 1 addition & 2 deletions src/devices/thermostat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 3 additions & 6 deletions src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define EMSESP_APP_VERSION "v3.2.2b7"
#define EMSESP_APP_VERSION "3.2.2b8"

0 comments on commit 84cc964

Please sign in to comment.