Skip to content

Commit

Permalink
fix: Enable state_value_template in discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
bjw-s authored Feb 8, 2024
1 parent 5436297 commit 02e519a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions software/NRG_itho_wifi/main/tasks/task_mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ void HADiscoveryFan()
snprintf(s, sizeof(s), "%s_fan", hostName());
root["uniq_id"] = s;
root["name"] = "fan";
// root["stat_t"] = static_cast<const char *>(statetopic);
// root["stat_val_tpl"] = "{% if value == '0' %}OFF{% else %}ON{% endif %}";
root["stat_t"] = static_cast<const char *>(statetopic);
root["stat_val_tpl"] = "{% if value == '0' %}OFF{% else %}ON{% endif %}";
root["json_attr_t"] = static_cast<const char *>(ihtostatustopic);
snprintf(s, sizeof(s), "%s/not_used/but_needed_for_HA", static_cast<const char *>(cmdtopic));
root["cmd_t"] = s;
Expand Down

0 comments on commit 02e519a

Please sign in to comment.