Automation including energy pricing condition ignoring condition and running anyway

Hi all, I’m trying to set my Givenergy setup to charge the battery when my half hourly Agile rate is below x.x£/Kwh. Currently in testing so the trigger is manual to charge for 2 mins. No matter what I put in the condition pass or fail, or even remove the condition the manual trigger always sets the battery to charge for 2 mins.

Here is the code, I’ve tested the condition and it states “CONDITION DID NOT PASS” which should stop the automation (allbeit currently triggered manually whilst I confirm it)

alias: manual_cheap_charge
description: ""
trigger:
  - platform: event
    event_type: manual_cheap_charge
condition:
  - type: is_monetary
    condition: device
    device_id: xxxxxx
    entity_id: xxxxxx
    domain: sensor
    below: 0.21
action:
  - device_id: xxxxxx
    domain: select
    entity_id: xxxxxx
    type: select_option
    option: "2"
mode: single

Any help appreciated :slight_smile:

Triggering an automation manually skips all the triggers and conditions and just tests the actions.

If you use the trigger automation service in Developer Tools → Services instead you will see there is an option to also test the conditions.

1 Like

Aha! I set to a time trigger and that’s done it. Thank you @tom_l

I can’t see my automation under developer tools > services, are you able to guide me please?

Select the “Automation: Trigger” service. Choose your automation entity. Turn off the skip conditions switch. Call the service by pressing the button.

1 Like