mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
auto formatting
This commit is contained in:
@@ -133,8 +133,8 @@ class Thermostat : public EMSdevice {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t hc_num_; // heating circuit number 1..10
|
uint8_t hc_num_; // heating circuit number 1..10
|
||||||
uint8_t model_; // the model type
|
uint8_t model_; // the model type
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string mode_tostring(uint8_t mode);
|
static std::string mode_tostring(uint8_t mode);
|
||||||
|
|||||||
@@ -524,7 +524,7 @@ void EMSdevice::register_device_value(uint8_t tag,
|
|||||||
register_device_value(tag, value_p, type, options, name, uom, nullptr, 0, 0);
|
register_device_value(tag, value_p, type, options, name, uom, nullptr, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if value is visiible
|
// check if value is visible
|
||||||
bool EMSdevice::is_visible(void * value_p) {
|
bool EMSdevice::is_visible(void * value_p) {
|
||||||
for (auto & dv : devicevalues_) {
|
for (auto & dv : devicevalues_) {
|
||||||
if (dv.value_p == value_p && dv.has_state(DeviceValueState::DV_VISIBLE)) {
|
if (dv.value_p == value_p && dv.has_state(DeviceValueState::DV_VISIBLE)) {
|
||||||
@@ -1263,7 +1263,8 @@ void EMSdevice::mqtt_ha_entity_config_create() {
|
|||||||
if (*(int8_t *)(dv.value_p) == 1 && (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) {
|
if (*(int8_t *)(dv.value_p) == 1 && (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) {
|
||||||
dv.remove_state(DeviceValueState::DV_HA_CLIMATE_NO_RT);
|
dv.remove_state(DeviceValueState::DV_HA_CLIMATE_NO_RT);
|
||||||
Mqtt::publish_ha_climate_config(dv.tag, true);
|
Mqtt::publish_ha_climate_config(dv.tag, true);
|
||||||
} else if (*(int8_t *)(dv.value_p) == 0 && (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || !dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) {
|
} else if (*(int8_t *)(dv.value_p) == 0
|
||||||
|
&& (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || !dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) {
|
||||||
dv.add_state(DeviceValueState::DV_HA_CLIMATE_NO_RT);
|
dv.add_state(DeviceValueState::DV_HA_CLIMATE_NO_RT);
|
||||||
Mqtt::publish_ha_climate_config(dv.tag, false);
|
Mqtt::publish_ha_climate_config(dv.tag, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class Mqtt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void ha_climate_reset(bool reset) {
|
static void ha_climate_reset(bool reset) {
|
||||||
ha_climate_reset_ = reset;;
|
ha_climate_reset_ = reset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool send_response() {
|
static bool send_response() {
|
||||||
|
|||||||
Reference in New Issue
Block a user