Hide "Unavailable" states

Joining the WTF frenzy, here is one of my most irritating nits.
We need a filter in device-states to hide unavailable entities.
More than half of my entities are permanently unavailable and are replaced with “_2” copies.

Since it is apparently impossible to delete old, unused entities, why can’t we just turn on a filter to hide “Unavailable” entities?

unavailable

Disable them and they will be removed from that list, and all of HA, except for the entities page which has a filter to hide disabled entities.

How were those old entities added to HA? manually or via an integration?

if via an integration was the integration a yaml configured integration or UI configured?

If you click on the entity information what does the dialogue box that pops up for the entity say?

I don’t think I’ve ever had an entity that I could never get rid of in some way.

I shouldn’t have to.
Maybe I don’t keep my system as squeaky clean as you do.

Most of the “unavailable” entities are the result of making a change in the YAML configuration for a device. Then spending more time fixing all of the broken automations and scripts because Home Assistant thinks it’s a new device and adds a _2 to the entity ID.

I’m not sure what you mean. You shouldn’t have to do what?

But if you delete the old entity then fixing all the automations and such is as easy as just renaming the *_2 entity to remove the *_2 part. Then everything else just works.

That means you don’t have a unique_id and when you restart they will be gone. If you reload without a unique_id, you’ll get _2 entities. There’s no way around this because HA doesn’t know the configuration has changed.

Then why did adding the Unit of Measurement in this template create a new _2 entity (sensor.office_temperature_fahrenheit_2)?

template:
- sensor:
    - name: "Office Temperature (Fahrenheit)"
      unique_id: "office_temperature_f"
      state: "{{ (states('sensor.office_temperature') | float(0) * 9/5) + 32 }}"
      availability: "{{ has_value('sensor.office_temperature') }}"
      unit_of_measurement: "°F"
      device_class: temperature 
      state_class: measurement     

mqtt:
  sensor:
    - name: "Office Temperature"
      unique_id: "office_temperature"
      state_topic: "rtl_433/Zotac/devices/Oregon-v1/1/15/temperature_C"
      unit_of_measurement: "°C"
      device_class: temperature
      #Convert to °F in templates.yaml