Rest sensor: add support for unique_id (thus areas, GUI support, etc.)

Currently you can’t assign a unique_id to a rest sensor, which causes problems. See here: https://github.com/home-assistant/core/issues/44510

May I ask why you need to add a rest sensor to an area?

I’d like to trigger an automation based on an area. Not sure if this is possible yet, but seems like it will be soon.

Also I’d like to be able to rename stuff from the GUI.

2 Likes

Ok, just make sure to vote for your own request then :wink:

I too need this, simply so that my rest switch can be set to show in the right area of the automatically generated dashboard.

Same here. Adding a REST Sensor to read values and then being unable to assign it to the proper area is frustrating at least.

Right now I’m pulling gas prices from my local gas station into HA using a REST endpoint and it turns up in the “System” area. I want it in a seperate area.

I do not understand why you cannot have UniqueID be an option for everything?

It removes ambiguity for those of us who want the most control.

For example, I have a lot of cloud based integrations. If I cannot ping the host then I know to suspend restarting the integration.

1 Like

also not possible for other binary sensors, such as ping. And why do i need an area for a ping sensor? I have an IT room where my IT stuff is, and i use binary ping sensors to detect when some devices disconnect from the network and would like to put those sensors in the “IT” area.

1 Like

darn… just setup ping sensors and wanted to put them under the area of the thing being pinged… hope this gets knocked out

1 Like

Likewise - just done exactly the same. It’s not a big deal, but it would be nice if all sensors could be assigned an area, just for tidiness of the auto-created lovelace dashboard!

+1 vote.

I was surprised that I can’t have unique_id for some objects created with YAML. I can for some, can’t for another ones. Seems new types have this feature, but legacy ones not always. Would be nice to have such option for all objects.

Say, this sensor would have area defined, so on a telemetry page I can show it properly. But I can’t set an area without unique_id.

binary_sensor:
  - name: bathroom_humidity_high
    platform: threshold
    entity_id: sensor.bathroom_humidity_difference
    device_class: moisture
    upper: 8

+1 Vote

Have several HomeKit sensors for temperature being brought into HA using REST. Would be nice to have a unique_id so things like temperature format (i.e. unit & precision) can be changed easily in the UI. Some integrations aren’t flexible enough to do this before POSTing and creating a template sensor based on the entity sounds redundant.