Trying to trigger on Nest Away

I’ve created this automation, and I’ve tried settint the Nest Away to a state on, and then off.
But that didn’t trigger this automation?

  • alias: Turn on lights when returning home
    trigger:
    platform: state
    entity_id: binary_sensor.familien_fribert_away
    to: ‘off’
    condition:
    • condition: sun
      before: sunset
      after_offset: “-1:00:00”
      action:
      service: light.turn_on
      data:
      transition: 60
      entity_id: group.gruppe_faellesomraader

Hi there.
I have an automation to turn off light and set nest to away mode and then send a message to my phone. Have a look below and look at yours. I don´t see any action in your code. only a trigger and conditions.

- alias: Heating and lights off if everyone left for more than 15 mins
  trigger:
    platform: state
    entity_id: group.people_away
    to: 'not_home'
    for:
      minutes: 15
  condition:
    condition: state
    entity_id:  input_boolean.override_home
    state: 'off'
  action:
    - service: nest.set_away_mode
      data:
        away_mode: away
    - service: light.turn_off
      data:
        entity_id: group.all_lights        
    - service: notify.ios_iphone_rene
      data:
        message: 'Lowered heating and lights off'

Hi there

Not sure where the trigger went, but it is there:

- alias: Turn on lights when returning home
  trigger:
    platform: state
    entity_id: binary_sensor.familien_fribert_away
    to: 'off'
  condition:
  - condition: sun
    before: sunset
    after_offset: "-1:00:00"
  action:
    service: light.turn_on
    data:
      transition: 60
    entity_id: group.gruppe_faellesomraader

So, I’m trying to trigger on the ‘home-away’ thing from Nest, and you are setting it :slight_smile:
My problem is that I wanted to test it, and tried using the ‘set state’ in the interface, but it didn’t trigger?

ok! sorry. now I get it.

in that case, why have a separate binary_sensor and don´t you take the one from the nest directly:
the state of the climate entity?

In my case:

I think the binary sensor is coming from my doorbell, which is the only Nest product I have yet (the protect isn’t in Danish yet, and until they get that done, I won’t replace my current smoke detectors) or climate controllers (I have AVM Fritz!Box Dect as thermostats).
So I think that is pretty accurate as long as the phones have the app installed.
I’m contemplating moving away from that, but for now, that is what I’m using.