Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix console show with empty full name #404

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/emsdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1034,10 +1034,8 @@ bool EMSdevice::generate_values(JsonObject & output, const uint8_t tag_filter, c
// 3. it must match the given tag filter or have an empty tag
bool conditions = ((tag_filter == DeviceValueTAG::TAG_NONE) || (tag_filter == dv.tag)) && dv.has_state(DeviceValueState::DV_ACTIVE);
// 4. for MQTT we want to always show the special HA entities (they have an empty fullname)
bool visible = ((dv.has_state(DeviceValueState::DV_VISIBLE)) || ((output_target == OUTPUT_TARGET::MQTT) && (!dv.full_name)));
conditions &= visible;

if (conditions) {
bool visible = ((dv.has_state(DeviceValueState::DV_VISIBLE) && dv.full_name) || ((output_target == OUTPUT_TARGET::MQTT) && (!dv.full_name)));
if (conditions && visible) {
has_values = true; // flagged if we actually have data

// we have a tag if it matches the filter given, and that the tag name is not empty/""
Expand Down