Event state as condition


I have a Toon thermostate and have services for the temp settings.
If the sun is set (trigger), and the thermostate is set on away (condition), the alarm needs to be set (action)

I can use the service as trigger or set as action but not as condition.

Can someone help me?

sounds like you need to do something like:

  condition: state
  entity_id: your.thermostat
  state: 'away'

Thanks for you time

This is my automation just to test it:

- alias: Test
  hide_entity: true  
    platform: state
    entity_id: light.voorraadkast
    to: 'on'
    - condition: state
      entity_id: climate.toon_van_eneco
      state: 'eco' 
    - service: homeassistant.turn_on
      entity_id: switch.schutting

The switch schutting will not go on.
i made a scene where I renamed eco to away.

- alias: Test
    platform: event
    event_type: call_service
        entity_id: scene.toon_weg       
      domain: scene
      service: turn_on
    service: homeassistant.turn_off
    entity_id: switch.schutting

This is working but as I said I want scene as condition.

can you please format your code?

a scene is not a state so you wont be able to use it as a condition

Sorry i’m new with this!
So is there a way to get this done?

its in my reply as per the banner at the top of this page. highlight your code and use the </> button

I did it. So there is no solution for the condition i want?

I’m a little confused at what you want…

this condition-

    - condition: state
      entity_id: climate.toon_van_eneco
      state: 'eco' 

…should work. you cant use a scene as a condition, but you mention trying to change the name via a scene… thats not correct

Yes i want that as condition but is doesn’t work.
No action done after the trigger is set.

is the state of climate.toon_van_eneco actually currently in ‘eco’?

Yes it is.

any errors in the log?

No i checked the log no errors. I’ll ask the question in a other discussion. Thanks