Can a state name be changed

I just installed a water leak detector sensor. It is a simple closed/open contact and the names show up that way in the states. I want to change the states from closed/open to Normal/Leak Detected. Would someone be able to guide me if this is possible and if so how. I have seen some information about changing it in the developer tools but can’t figure it out.

You can give it a device_class of moisture via customization, which will change the icon and the text to what’s shown here, but if you want to customize further, you need to create a template binary_sensor, where you can make the text and icon whatever you want.

Also, changing the device_class only changes how the state is displayed and not what the actual value is. A binary_sensor will always be on or off, regardless of what it represents.

2 Likes

Thanks, that worked