The most lights are zigbee devices. I am controlling them with a conbee 2 stick. I am controlling them 99% with a real switch on the wall and 1% with home Assistant.
The bulb from mystrom is old and actually depricated.
Hi all
I have the same issue with missing “unique ID”.
I use a TP-Link HS110 “smart plug”.
The device works fine with my HA setup for “on/off” function.
But I’m not able to read power data from the device. Now the only show “0” watt.
“this entity (“sensor.energimaaler_volts”) does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail.”
(SW, HA version 2020.12.1, MS WIN10, Python 3.8.1)
(HS-110 firmware 1.5.6)
I have add follow to the configuration file:
tplink:
discovery: false
switch:
- host: 192.168.XXX.XX (IP of the device)
sensor:
- platform: template
sensors:
energimaaler_amps:
Current Consumption"
value_template: "{{ state_attr('switch.energimaaler','current_power_w') | float }}"
unit_of_measurement: 'W'
energimaaler_total_kwh:
friendly_name_template: "{{ state_attr('switch.energimaaler','friendly_name') }}
Code for read data:
entity: sensor.energimaaler_watts
name: Watt
type: entity
Where can I found the “unique ID” ?
Where to add the “unique ID” in the config file?
Wjy do you think a unique id is needed?
I got this “error message” when I selectin “settings” in Locelace UI.
This entity (“sensor.energimaaler_watts”) does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail.
<
And your point is?
@nickrout, as predicted, the people who don’t understand that vague message about a missing unique_id keeps on coming. So we can continue to question their reasoning and sanity, or accept that a good UI (and system) is unambiguous and not confusing to its users, and that there is room for improvement here. At the end it is not about whether the system actually works correctly, but whether the user perceives it to work correctly.
Some people configure their systems and read the docs. Others look for problems and post endlessly about them. Unfortunately the latter are very noisy. The solutions have been posted in this and many other threads, and on many occasions. But the problem persists. (That last sentence is deliberately ambiguous on wheter the problem is the users or the message in the UI )
I think the main problem here is the how this sentence is phrased: As it is now, it actually means - If an entity has an ID which is not unique, then there is another entity in the system with the same ID.
And if that’s the case, then it obviously is a problem!
I’m in IT myself, at some point as developer working on a system with thousands of users (not exaggerating), and later as architect of that application. I don’t consider myself naive or a novice on the behavior of users. Acknowledging that there are all kinds out there, a good developer will look inward how the problem can be addressed, or the user experience be improved, to prevent users from reading documentation or running to forums in the first place. Even more so if the problem is raised in ‘this and many other threads’, and ‘the problem still persists’.
In this case, the missing unique id is by design (??) and knowing about it does not add anything to solve the problem, so simply don’t mention it anywhere. Sometimes less is more, something we can learn from Apple’s design philosophy
My first reaction when I saw the message, and read the documentation, was that perhaps I missed something, and to find a way to add the unique id. The irony is that for some types of identities it is actually possible to specify a unique id in configuration.yaml
and hence address the problem.
I agree that the message could be better worded. How about
this entity does not have a unique_id. Check the integration’s docs to see if you can add one, or you can configure the entity via yaml.
I would say that irony is that there are integrations which disallow adding of unique id to yaml configuration.
But this all mess (infinitelly resolving GUI message existance, its wording, manually adding unique ids) is just attempt if finding workaround while there is one simple rootcause: bad design decission. And this is the thing which should be fixed.
Nobody discusses that because most of users are not skilled in software engineering to identify a culprit. Or just don’t want to say bad word about devs work.
But actually there is the rule of thumb: if some feature causes endless issues, it’s bad feature.
For me as architect, existence of the second unique identifier alone is the first symptom that something went wrong.
Now I know that the second identifier has been invented in order to make possible to rename the first one using GUI. And at this point I’m even more confident that it is wrong way how to solve the need.
I’m sure making a step back and redesigning this part of system would save us from a lot of hassle. But also I can imagine how challanging would be such decission. Unfortunatelly this is how it goes if not enough resources are invested to design prior to programming itself.
such message can be shown in GUI if users are considered to be co-developers. You cannot show it to regular user who is not intrested in such deep details.
I know that for some of you HA is still software experiment in alpha/beta stage. But if someone is thinking seriously about HA as production-ready solution, it cannot bother users with such messages.
IMO, if any message is needed, it should be in form: “this integration doesn’t support entity renaming”. dot
But missing of this message would make no harm imo
Nonsense. Users need a pointer as to what the error message actually means for them. Nothing to do with being co-developers. Reading docs and/or typing some simple yaml is not development.
but this is not an error. Just some integrations allows to edit their entities in GUI while other don’t. It is how it looks from user pov.
If user is missing a feature of renaming entities, it could learn from docs about prerequisites. btw is there any page explaining that???
If it is an error, it’s the error made by devs. regular users should not be involved into that.
Changed my last post.
from this thread I can see people are more bothered by message itself than missing feature of renaming entity
unfortunatelly docs say nothing about how uniqueid is used by HA. there is excerpt from mqtt light:
unique_id string (optional)
An ID that uniquely identifies this light. If two lights have the same unique ID, Home Assistant will raise an exception.
the description together with ‘optional’ word in header doesn’t give enough importance in comparison with message in GUI.
So instead of bothering users by showing vague message in GUI it should be clearly explained in documentation. At the end everyone who adds devices manually must read this part of documentation
add away. Adding docs is one of the easiest ways of becoming a contributor.
Maybe you could possibly only show this to admins with advanced mode on?
maybe… but I can imagine how many places in HA deserve simmilar messages/explanations. Do we really want to flood HA with that?
Isn’t “advanced mode” dedicated to advanced users who know what this message is about?
Isn’t “advanced mode” being enabled by most (if not all) users regardless they are advanced or not?
Imo it would be another workaround to already existing one.
It gives no guarantee that devs will change their mind. So no… thank you.