mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-31 02:59:10 +03:00
Merge pull request #2913 from proddy/dev
fix ha climate mode to use bool format
This commit is contained in:
@@ -130,7 +130,9 @@ let system_status = {
|
|||||||
// partitions: [],
|
// partitions: [],
|
||||||
developer_mode: true,
|
developer_mode: true,
|
||||||
model: '',
|
model: '',
|
||||||
|
board: '',
|
||||||
// model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)',
|
// model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)',
|
||||||
|
// board: 'E32V2',
|
||||||
// status: 0,
|
// status: 0,
|
||||||
status: 3
|
status: 3
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1446,3 +1446,5 @@ vchip
|
|||||||
SPIIO
|
SPIIO
|
||||||
SPIDQS
|
SPIDQS
|
||||||
txpause
|
txpause
|
||||||
|
relais
|
||||||
|
pinout
|
||||||
@@ -1425,10 +1425,12 @@ bool Mqtt::publish_ha_climate_config(const DeviceValue & dv, const bool has_room
|
|||||||
|
|
||||||
// add hvac_action - https://github.com/emsesp/EMS-ESP32/discussions/2562
|
// add hvac_action - https://github.com/emsesp/EMS-ESP32/discussions/2562
|
||||||
doc["act_t"] = "~/boiler_data";
|
doc["act_t"] = "~/boiler_data";
|
||||||
doc["act_tpl"] = "{% if value_json.hpactivity=='cooling'%}cooling{%elif value_json.heatingactive=='on'%}heating{%else%}idle{%endif%}";
|
char on_string[12];
|
||||||
|
doc["act_tpl"] = "{% if value_json.hpactivity=='cooling'%}cooling{%elif value_json.heatingactive=='" + std::string(Helpers::render_boolean(on_string, true))
|
||||||
|
+ "'%}heating{%else%}idle{%endif%}"; // uses boolean translation for on/true
|
||||||
|
|
||||||
// map EMS modes to HA climate modes
|
// map EMS modes to HA climate modes
|
||||||
// EMS modes: auto, manual, heat, off, night, day, nofrost, eco, comfort, cool)
|
// EMS modes: auto, manual, heat, off, night, day, nofrost, eco, comfort, cool
|
||||||
// HA supports: auto, off, cool, heat, dry, fan_only
|
// HA supports: auto, off, cool, heat, dry, fan_only
|
||||||
bool found_auto = false;
|
bool found_auto = false;
|
||||||
bool found_heat = false;
|
bool found_heat = false;
|
||||||
|
|||||||
@@ -2976,7 +2976,7 @@ void System::set_valid_system_gpios() {
|
|||||||
// GPIO12 - GPIO15 = JTAG, normally not used
|
// GPIO12 - GPIO15 = JTAG, normally not used
|
||||||
// GPIO00, GPIO05, GPIO12, GPIO15 = strapping pins, can be used with care
|
// GPIO00, GPIO05, GPIO12, GPIO15 = strapping pins, can be used with care
|
||||||
// GPIO34, GPIO35, GPIO37 = input only
|
// GPIO34, GPIO35, GPIO37 = input only
|
||||||
// GPIO23 and GPIO18 are used by Ethernet, excuded later by eth config
|
// GPIO23 and GPIO18 are used by Ethernet, excluded later by eth config
|
||||||
// GPIO00, GPIO02, GPIO04, GPIO12 - GPIO15, GPIO25 - GPIO27 = ADC2 (10 ch), used by WiFI-driver
|
// GPIO00, GPIO02, GPIO04, GPIO12 - GPIO15, GPIO25 - GPIO27 = ADC2 (10 ch), used by WiFI-driver
|
||||||
// GPIO32 - GPIO39 = ADC1 (8 ch), can always be used
|
// GPIO32 - GPIO39 = ADC1 (8 ch), can always be used
|
||||||
if (ESP.getPsramSize() > 0) {
|
if (ESP.getPsramSize() > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user