Smart reader (in dutch slimme lezer) and capacity tariff

I have installed a smart reader (see https://www.zuidwijk.com 1, Marcel Zuidwijk).
When power consumption exceeds a certain value (in kWh), it sends a message.
This automation does not work:
description: slimmelezer
trigger:

  • platform: time_pattern
    enabled: true
    minutes: /1
    condition:
  • condition: template
    value_template: “{{ states(‘sensor.power_consumed’) | float(0)>2}}”
    action:
  • action: notify.mobile_app_le2123
    metadata: {}
    data:
    message: kwh is now {{ states(‘sensor.power_consumed’) | float(0)}}
    title: warning
    mode: single

it sends messages although the condition "template value_template: “{{ states(‘sensor.power_consumed’) | float(0)>2}}”* " is false. What am i doing wrong?

doesn’t look like esphome code but a home assistant script.

I find the smart reader/ slimme lezer under integrations → esp . Which is the correct category for the yaml automation in this forum?

Configuration, I think…