WTH do these commonly used integrations not support unique_id

PIggybacking off of the discussion of unique_ids versus entity_ids, I thought I would start to compile a list of the YAML-configured integrations I am using that do not support the unique_id property:

Please feel free to suggest others in the comments!

it does support it.

RESTful Sensor supports it. However, I often use RESTful in order to create multiple sensors using the same endpoint, and at least according to the docs, that variant does not support it.

that variant does, it links to restful sensors because the keys are shared.

The main rest integration doesn’t because it’s not creating individual sensors. The uinque_id needs to be on the sensor itself, not the header section.

rest:
  ...
  < NOT HERE, THIS IS HEADER, UNIQUE_ID WOULD BE USELESS HERE AS THIS DEFINES THE ENDPOINT NOT THE SENSORS >
  ...
  sensor:
  - name: xxx
    unique_id: xxx

To extend the question:
Why is the unique id optional and not the main identifier for all entities?

Because that is what it is. Someone has to build or contribute such features (it doesn’t magically happen out of nothing :smiley: )

For Trend & Workday, they will probably show up in the UI in the near future (I’ve seen PRs for them already), meaning those would gain those capabilities at that point.

2 Likes

Hmmm, thanks for the clarification. I was almost positive that I had tried adding a unique_id to the individual sensors when I set up one of my first REST endpoints a few months ago, but I’ll try it again and report back.

it doesn’t look like it’s available for binary_sensor, so that might have been your problem.

1 Like

Interesting. It’s working with both sensor and binary_sensor entities configured under the rest platform. I’ll remove RESTful from my list!

well, the docs for binary_sensor don’t list it when they should

Yeah, I was just going to mention that. The code for binary_sensor.rest appears to support unique_id, and I set up a standalone RESTful binary sensor and confirmed that it is working.

I have submitted a PR for the docs:

1 Like

I made a PR for tod here Unique id and cleanup in tod integration by gjohansson-ST ¡ Pull Request #79412 ¡ home-assistant/core ¡ GitHub

2 Likes

add generic_hygrostat, doesn’t support unique_id

min_max didn’t have it when using yaml but made a PR for it now Unique id and improved typing in min_max by gjohansson-ST · Pull Request #79496 · home-assistant/core · GitHub

1 Like

Environment Canada and QNAP for me, maybe not the most common, but it is very funny to see humidex and hard drive temperatures on an uncategorized sensor card

1 Like

I don’t believe Alert supports unique_id either.

3 Likes