Hope this is the right place for this. Crossposted from the Discord.
Hi folks,
I’ve got a little script on my raspberry pi pulling temperature off a ds18b20 sensor and sending it to Home Assistant.
Home Assistant tells me the entity doesn’t have a unique ID. Is this a problem? Is there any functionality I am missing by leaving this temperature sensor without a unique ID?
ds18b20’s have a unique number associated with them. Could I modify my python script to include this unique ID? How?
Thanks for this, it prompted me to edit my original post because I think the way I’m pushing the value was hidden in a mess of bad formatting. I’ve fixed that now.
I think I can include the unique ID in the headers or data section, but looking for guidance on how achieve that.
So, you cannot set the unique id in the api call. Only states, attributes and force_update are accepted data keys. Link to code below…
In order to have a unique id, you would need to define a template entity (other ways are also valid but assuming no integration for this) that you are updating via the rest api. Your unique id would be set in the template definition.
In terms of your question, i would say no you are not missing much without a unique id for a simple temp sensor like this.