-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Remove NUMERIC_DISCOVERY_LOOKUP mapping for current and voltage categ… #25322
base: dev
Are you sure you want to change the base?
Conversation
…ory and enabled_by_default
Current and voltage are disabled by default since they are not that much used, you can always enable them by default later. |
Sorry, the commit message was split across the issue title and the first category. Did you see that the diagnostic category was also removed in this PR? Your comment only mentioned the enabled nature for current and voltage. There is an overlap between the category values and what is in the presets definition in zigbee-herdsman-converters/lib/exposes.ts. I had to make these changes since they undo my herdsman-converters change that allowed me to remove the diagnostic category. Should I close this PR? |
They should be in |
Ok, I get that but, the change is duplicated across zigbee-herdsman-converters and zigbee2mqtt. See: Which sets the entity_category for current to diagnostic in the presets. This is done again in zigbee2mqtt at line: zigbee2mqtt/lib/extension/homeassistant.ts Line 209 in bc6eccf
My main issue with these decisions is that it removes control over what is considered diagnostic versus primary from the end user. The better answer is something in homeassistant that would allow you to override the category on a device basis, but I have been unable to locate such a capability. Until then, I will just run with my forked repository. Feel free to close this (and the zigbee-herdsman-converters) PR. |
https://developers.home-assistant.io/docs/core/entity/#registry-properties
|
@Nerivec Thank you for that reply, I did see the you could force an entity_category, but what I couldn't figure out how to do was REMOVE a category that the device maintainer set. E.g. There doesn't seem to be a way to make a "diagnostic" entity into a primary sensor. I think HA needs another category for "primary" sensors, rather than relying on the "absense" of a category to imply primary. Did I miss something? In my case, I purchased an energy monitor, but he only sensor not marked as diagnostic is energy (kWh). But I bought it to monitor realtime power (kW). I get that they wanted to keep the overview dashboard from being littered with every entity a device provides, I am just looking for a little more control. |
@2long1 You can add diagnostic entities wherever you want, the category does not hinder that. |
Given that the entire reason I'd pay extra for a smart plug with a power meter is to measure power usage, it's ridiculous that the default is to bury the power metering plug's power meter under Diagnostic, where it doesn't show in the default automatic dashboard. I know I could add it to a manually-create dashboard, but I haven't had a reason to do that, because the default dashboard is fine. The last time I tried zigbee2mqtt, I had to go back to back to ZHA because zigbee2mqtt made my power meters effectively useless. I initially thought it was outright broken, because it wasn't showing the power usage in the dashboard, unlike ZHA. Even if you really can't change the default, there ought to be a simple way to unhide the power usage, without having to do it individually for each device. |
Only the voltage and current is under diagnostics, energy and power is always enabled by default and not under diagnostics. |
I saw the same behavior with respect to power, which is handled in my merge request. |
…ory and enabled_by_default
This is for issue number #25319 I am not sure how I to link issue to PR's in github. This is only my second contribution. Let me know how I should do things in the future.
This is an optional change since it will likely have backward changing effects and for my purposes, the PR in the zigbee-herdsman-converters repo solves my immediate issue.