Is there a way to define some sort of “manual” binary sensor, a global parameter or something like that? I have two dogs and would like the possibility to manually flag in HA when the dogs are home alone. When I leave the dogs alone I have a script for switching on some lights and starting one of my Sonos speakers with radio. But I would also like this script to set some sort of parameter in HA as I want my automations to work a little different if the dogs are home alone. Any way to accomplish this? I would like something like a device tracker, but manual.
Something like this:
or this:
Thank you! I guess the input boolean is what I am looking for. As far as I understand the Binary sensor require an entity, or did I get it wrong?
Not necessarily but anyway I think the input boolean is better for your needs.
Check! Now I see the opportunity to learn something for the future… How can I create (and use) a binary sensor without tying it to an existing entity? I don’t really understand that. Would you care to give me a quick lesson?
I think I expressed myself incorrectly. I think it is possible to create a an empty binary sensor without an entity id, not sure but I need to check. However if you don’t provide an entity ID, the sensor will only change when you change it manually. So it’s basically the same as an input booelan, but “harder” (yoi have no toggle on the frontend etc.) to set it on/off.
A binary sensor changes state automatically when the expression configured for the sensor evaluates to “True”, e.g. the binary sensor config is “state of temp sensor > 20”, the sensor will then automatically change to “on” as soon as the state of the temp sensor is above 20 and change back to “off” when it’s below 20 again.
Thank you for a very good explanation! Highly appreciated! It works like a charm using the Input boolean.