Skip to content

Commit c660440

Browse files
committed
fix: show all devices, except system (#31)
1 parent 7003301 commit c660440

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mqtt.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,8 @@ void Mqtt::register_command(const uint8_t device_type, const __FlashStringHelper
108108

109109
// register the individual commands too (e.g. ems-esp/boiler/wwonetime)
110110
// https://github.com/emsesp/EMS-ESP32/issues/31
111-
// for now only do this for the boiler
112-
if (device_type == EMSdevice::DeviceType::BOILER) {
113-
std::string topic(100, '\0');
111+
if (device_type != EMSdevice::DeviceType::SYSTEM) {
112+
std::string topic(MQTT_TOPIC_MAX_SIZE, '\0');
114113
topic = cmd_topic + "/" + uuid::read_flash_string(cmd);
115114
Mqtt::subscribe(device_type, topic, nullptr);
116115
}

0 commit comments

Comments
 (0)