- trigger:
platform: state
entity_id: group.all_devices
to: 'not_home`
action:
...
group.all_devices is typically created automatically. If that doesn’t suffice, then create your own group with the device_tracker entities you care about and use that in the trigger. A group of device_tracker entities will be 'home' when any of the devices are home, and 'not_home' when none of the devices are home.
The life360 integration doesn’t determine that. It simply finds the device’s location as longitude, latitude & gps_accuracy (radius.) Then HA decides if you’re home by seeing if that circle overlaps the circle that defines your “Home zone” (which, by default, has a radius of 100m.)
EDIT: It’s probably easiest to see what I’m talking about by looking at the map page when at least one person is not home. You’ll see a circle representing the Home zone, and a circle representing each person/device that is not home. (Devices that are home are hidden on the map.)
Good news!
The following code worked. I returned home and the awning was closed. The bad news is that it was raining also and my chairs are wet right now but nevermind.
Right now I manually opened the awning and although the wind speed (in dark sky widget in fronted) is 21 the awning does not fold. What is the frequency that the automation check the wind speed?
Finally is there any “distance sensors” which I could installed at the edge of the awning in oedr to get it’s position? (max distance 3 meters)
The trigger is not checked periodically. It is evaluated whenever sensor.dark_sky_wind_speed changes.
Did you manually open it while the wind speed was above 20? If so, that would explain it. Remember (except at startup), the numeric_state trigger will only fire when the sensor goes to 20 or below, and then rises above 20. To say that another way, it will fire whenever the sensor changes from a value of 20 or below to a value above 20. It only happens on that transition. If that’s not what you want, then you’ll need to implement it differently. I can make a suggestion, but you’ll have to be fairly specific about how you want it to work.
@pnbruckner
As I said the above automation is working ok. I have one more which is doing the exact same thing but time based.Every morning at 09:00 o’clock it is bringing the awning at the desired position.
This is for safety reasons in case the wind speed from dark sky isn’t accurate.
I was wondering if there is a way to record somehow (after 09:00 o’clock) the movements of the awning (if any) in either position manually or through HA. The next day if the day before was any movement I would like the automation to fire. However if there was no movement (the awning is in the desired position) I would like the automation to pass. Is this achievable?
There are probably a few ways that you could record if any movement was commanded by HA. However, how can you tell if the awning was moved “manually” (i.e., outside of HA)? I suspect the cover entity may change state when the awning is fully opened or fully closed, but what about if it’s moved in between? Does HA have any way to see/detect that?
I assume that it could, but you are right. If I manually move the cover I don’t see any indication in HA that detects the movement
If I do change the position through HA interface then the arrow in HA is turned to grey from black and that it is an indication I guess
(before I do the manual test I thought that it the same would happen in the manual mode)
So I think I stack again