How to stop automation from looping

The classic way to do that is:

- 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.

one “problem” I have is that I haven’t manage to declare my devices. (or at least I think i don’t)

my devices I mean our smartphones (because I don’t know how, since I don’t have a suitable router)

In the provided code which devices HA understands from group.all_devices?.
In my logic it should take account our smartphones (we don’t have tablets)

I checked the entities and yes I have all_devices but need some clarification in order to understand it

Look for device_tracker.xxx type entities on the States page. Also, look at the entity_id attribute of the group.all_devices entity.

I will, although I didn’t understand a lot at the first time
In which distance from home (approx) life360 consider that I am not the 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.)

Thanks.will check it tomorrow

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)

 id: test Awnings
  alias: Awnings_windy
  trigger:
    platform: numeric_state
    entity_id: sensor.dark_sky_wind_speed
    above: 20
  action:
    - service: cover.close_cover
      entity_id: cover.50758014840d8e918614

configuration.yaml

sensor:
  - platform: darksky
    api_key: cdca841d47403abd1f21c31030ad4264
    monitored_conditions:
    - wind_speed
    units: ca

Should I add something like this?`Preformatted text

scan_interval:
  # At least one of these must be specified:
  days: 0
  hours: 0
  minutes: 3
  seconds: 30
  milliseconds: 0

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.

Ok. That’s the reason why isn’t folding. Any suggestion about a distance sensor?

Nope. I’d suggest you start a new topic in the Hardware category.

@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 :slight_smile: