UI "States" not saving changes

Every time I try and modify an attribute for a sensor using the UI Developer tool States window. My changes only last 20-30 seconds and then it reverts back to the original settings. I have been at it over an hour reading documentation and the forum with NEGRES. What am I missing? Thanks for any help you can offer.

I am trying to assign a device_class: for a door sensor so it will say open/close vice on/off.

You need to set the device class through customization.

In configuration.yaml add this in the section homeassistant:

customize: !include customize.yaml

It should look like this:

homeassistant:
  customize: !include customize.yaml

Then create a file called customize.yaml in the same directory as configuration.yaml and add the following to this file (where binary_sensor.door_sensor is the entity id of the sensor you want to change):

binary_sensor.door_sensor:
  device_class: door
3 Likes

Just a heads up. If you have this file created, you can use the GUI to manage all customizations.

2 Likes

Thank you this worked. Been pulling my hair our

Or you can do it in packages :rofl:

2 Likes

Is there even something you can’t do with packages? :crazy_face: :joy:

1 Like

Well yes I have 27 lines in my configuration.yaml (2 of them comments) so I do have 25 lines I can’t get put in packages. EVERYTHING else is in packages.

I think mine is about the same length. By the way, do you have a public Git repo?

No,

10 char limit