-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
various minor changes, including managing hidden entities in customization screen #527
Conversation
@@ -464,7 +471,7 @@ const SettingsCustomization: FC = () => { | |||
setMasks(['']); | |||
}} | |||
> | |||
<ToggleButton value="8" disabled={(de.m & 1) !== 0 || de.id === ''}> | |||
<ToggleButton value="8" disabled={(de.m & 1) !== 0 || de.id === '' || de.s === de.id}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the check for === ''
is not needed anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, good spot
Another point, the reset have short- and fullname "reset", we have to rename to different names now to allow to show in web ui. And same for some other values with identical texts: heatmetering, pumpkick, doublematchflow, activated, status. Isn't it easier to leave fullname blank and use a combined string |
that's an option. but how would we detect in the web UI if it's a hidden entity or not? |
I have not read the table documentation, so maybe i'm wrong. As you mentioned the unique id i thought this is this key: https://github.com/emsesp/EMS-ESP32/blob/9d25f8049c92b024e33c0bceefc66306a008018d/interface/src/project/SettingsCustomization.tsx#L453 |
the data object takes an array of nodes which must contain the id property. It's internally and not the |
ok Michael, think this should work now |
obj["s"] = dv.short_name; | ||
// n is the fullname, and can be optional | ||
// don't add the fullname if its a command | ||
if (dv.type != DeviceValueType::CMD) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you skip the fullname for commands? I think show them as normal and delete line 842/843/853
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is only one command, in the boiler called reset and it shows up in the Customizations as reset (reset)
which is silly. The shortname is also not relevant as it's not part of the API and MQTT. If you think we still need to show the shortname then I would suggest changing the fullname to something more descriptive like 'reset command' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But you skip the fullname for command and so it's handled as hidden, but it is not hidden, we want to have all options to show in web. Since you are using now the shortname as id, you can not skip the shortname.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can modify formatName() to
if (de.n === undefined || de.n === de.id) {
return de.id;
to avoid "reset (reset)" and "pumpkick (pumpkick)", "activated (activated)", etc. This have no effect to the customization logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that's a much better option. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sending the entity fullname if its a command as this is the only way the Customizations web page knows whether it's a command or not.
You are mixing commands and hidden values with the result that now both are not working correctly. |
not sure I follow. It works for me. What is a 'hidden' entity? |
Yes, i think leave the value to climate, it's a good feedback that it's active and shows the right value. (as you see above in my screenshot for ha disabled the value is empty). |
ok, so if you're ok with PR can you approve and merge it? (or I'll do it, either way) |
No description provided.