I can think of a few (since I like this idea as well). First one that comes to my mind would be a sensor you were using for presence. Let’s say for example that you had a sensor that detected when someone was sitting in a chair and you wanted to use input from that sensor to determine whether to turn on the lights.
The easy way to do that would be to turn the lights on if the sensor says someone is in the chair and turn it off if not. That would probably work but if the sensor is pretty sensitive that could get quite “twitchy”. You wouldn’t want the lights to flicker just because someone shifted in the chair. Limiting it to transition only if the sensor’s state has changed for at least a second or two seems like it would result in a better experience.
Another I personally use a lot is a light sensor to determine brightness in the room. I track light level in rooms with smart lights and have binary sensors for
bright_<room> which becomes on when light level is above a threshold and off otherwise. I then combine that with presence data to turn the lights on/off when someone is in the lights and its dark.
This one has similar issues to the chair situation though, I don’t want it to be “twitchy”. In this case the problem occurs if the light level is very close to threshold. So because of that prefer to only transition the light if light level has crossed the threshold for a specified amount of time.
Now with these you could argue that since these use cases are all binary wouldn’t it just be easier to make an
off automation instead of using a conditional in the script? Perhaps, I prefer to combine but I can understand this. So here’s one additional non-binary one I use as well: guessing the mode of transit based on the velocity of a
This could then be used for calculating ETA to send that information to Nest/Ecobee/etc. so the house can be a comfortable temperature by the time you get there. If you’re differentiating between car, walking and biking based on velocity though then you’d obviously have a problem with traffic lights since the car’s velocity goes to 0. So you’d only want to change your mode guess if there was a sustained transition between states.