As the title suggest, I’d like to change an input boolean to motion-sensor the use for homekit bridge as front-door “motion detected”. But in the “helpers” section is templating such a sensor not possible.
I needed this because the Unifi “smart detected a person in front of your door camera” works fine, but when someone is at my door for serval minutes (like delivery service), the integration keeps fireing the motion detected sensor on and off and on. When I couple this sensor directly to homekit bridge (like suggested in many examples). My homekit app constant notifies some-one is at my door (while i’m busy at the door with the delivery). So my tought was to create an automation controlling an input boolean “motion is happening” until the thing at the door is really over, and then disable the input boolean again. And then use the input boolean as “motion sensor” for homekitbrige, so there is only 1 notification from homekit there is someone at the door, and not serval. But it seems not possible to fake the device-class with a helper… I worked around the problem with an automation, but it’s kind of a complicated work around which could be a lot easyer if I could just change the boolean with the helper…
This is what template entities are for. You can create a trigger based binary template sensor with delayed off to get the same effect and it’s a rather simple template entity.
I would love to have that, too. As a noob, I just created a input boolean helper for occupancy for each room. I think most people will avoid template helpers. An input boolean is qite similar to a binary sensor. It should be possible to assign a device class.
input booleans are closest to a switch, a binary sensor is something you cannot modify the state of. There isn’t anywhere in the UI where you’d get use out of a device_class on an input boolean because you’ll always see the toggle value represented by the color of the card or the nature of the toggle switch.
Because I use the input booleans to reflect the state of a “device” or a room. This can be my mailbox( the device-class mail is missing) or as stated above the occupancy.
For example, I have an automation switching an input bolean to on, based on two PIR and one die sensor. It would be nice if this input bolean could be configured to be shown as different devices, like the binary sensor can. I hope I could make it clear.
Probably I am thinking wrong, cause otherwise this WHT would be voted much more.
Device class only handles translations and icons, the functionality in the UI is not handled by device class. So adding device class to input booleans would only get you icons because the UI only displays input booleans as a toggle switch (with no words).
What would you do? Try to write the automations which handle the state of the input booleans into the template binary sensor? Or add template binary sensors based on the state of the input booleans? Or is there even a better way I do not know about?
For me it was not an automation who didn’t work. The homekit bridge integration did not accept the entitiy’s deviceclass as I faked it with a template.