Skip to content

Commit

Permalink
Merge pull request #229 from bjw-s/master
Browse files Browse the repository at this point in the history
fix: Enable state_value_template in Home Assistant discovery
  • Loading branch information
arjenhiemstra authored Feb 9, 2024
2 parents b1e6312 + 02e519a commit 8c2251d
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 8c2251d

Please sign in to comment.