Can someone explain automation condition checking?

I don’t know how copy/paste code into a window like you guys have done… but here is the trigger I defined

alias: Geyser ON - (SOC>50)(Grid<500)(<6pm)
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.solarsynk_2301280141_battery_soc
    from: null
    to: null
condition:
  - condition: numeric_state
    entity_id: sensor.solarsynk_2301280141_battery_soc
    above: 50
  - condition: numeric_state
    entity_id: sensor.solarsynk_2301280141_grid_power
    below: "500"
  - condition: state
    entity_id: switch.1001e2bc91
    state: "off"
  - condition: time
    before: "18:00:00"
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.1001e2bc91
mode: restart

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Or

https://community.home-assistant.io/t/how-to-format-your-code-in-forum-posts/702762

1 Like