Home assistant binary sensor drop down list

I’m very new to home assistant I just added a shelly 1 plus to notify me when my alarm is on , but in the overview my alarm sensor doesn’t show me on or off as anything in the "Show As " drop list none of them will give you On or Off , is there a way to change it

Any ideas how to fix the above

Hey there, welcome to the forum!

I tried to understand what you’re saying, but I’m sorry, even after reading it a few times, I can’t say, what your problem is. :slight_smile:

Please, be more detailed, and more clear in your wording. I know, this can be difficult, especially if you aren’t a native speaker, but please try.

What I read from your post, you have a “Shelly 1 Plus”. I have no idea, what you mean by Overview and on or off?

If I understand correctly, you’re trying to modify the device class through the UI and looking for a class that simply shows “on” and “off” for the sensor? Is that correct?

1 Like

Yes correct , is it possible

image

I what to change the Alarm status from light detected to “On”

Strictly for display purposes, not exactly? When you set something in the Show as, it stays that way unless you change it to something else and I don’t think there is a defined On/Off device class that I know of.

Is this a template sensor that you setup or something created by an integration?

[EDIT]: Ok, that looks like a helper you created. Just delete and recreate the helper and it should revert back to the default device class and only show On/Off.

1 Like

In a million years, I wouldn’t have guessed that! :slight_smile:

2 Likes

I only know it because I was goofing off with helpers a few weeks ago trying to help someone and saw it in the UI and was like “Oh, now that’s cool!” until I realized that once you set the Show as, you can’t unset it. It’s stuck that way unless you delete and recreate the helper. :man_shrugging:

1 Like

I haven’t set any helper at all , I can’t seam to find any “On or 'Off” , in the Show as ,

Ahhhh, ok. So, you set it in the entity. So, AFAIK, there is no way to “unset” that once it’s set.

My only suggestions are to create a template helper that uses that entity to show on/off as you want OR maybe try the Power or Plug class? The template helper is the better way to go:

{{ iif(states('sensor.alarm') == 'on', 'On', 'Off') }}

Have you tried just deleting the “Show as” entry by pushing the “X” next to the arrow where you open the select menu?

And if this doesn’t work, have you simply tried to delete the light entry by its own? It should be listed in your dev tools.

I confirmed on mine this doesn’t work. You can clear the Show as and then click Update, but when you go back into the properties, Show as is set to the previous value.

1 Like

If I go to developer tools and select the device and delete the entry in the device class and press set it works , but it doesn’t save the change it just go back , is there a away to save it

Nope. It appears to be a bug. There is no way to save it once it is set.