HomeWizard Energy P1

Hi everyone,
I bought a HomeWizard Energy P1 meter

and use the hacs integration in HA to get values.
So far so good

Now I’m trying to create an automation that turns on a light when my active power is below a certain threshold.

In the GUI of HA:

TRIGGERS

2022-01-17_16-39-31

CONDITIONS

2022-01-17_16-40-16

ACTIONS

2022-01-17_16-40-45

However, this seems not to work. I checked the values, i.e.:
2022-01-17_17-42-19

PS.
In YAML, the automation became

2022-01-17_17-45-09

- id: '1642434242283'
  alias: SchakelAlsVerbruikOnderGrens
  description: SchakelAlsVerbruikOnderGrens
  trigger:
  - platform: numeric_state
    entity_id: sensor.p1_meter_active_power_l1
    id: sensor.p1_meter_active_power_l1_250W
    attribute: unit_of_measurement
    below: '325'
  condition: []
  action:
  - type: toggle
    device_id: 829993eca56b2896acc3b9851fec86f7
    entity_id: light.my_n00_p03_light_l19_hanglamp
    domain: light
  mode: single

What am I doing wrong?

Any help is appreciated,
kind regards,
Bart Plessers

aaaaargh, stupid me.
I selected a wrong attribute… :flushed:


- id: '1642434242283'
  alias: SchakelAlsVerbruikOnderGrens
  description: SchakelAlsVerbruikOnderGrens
  trigger:
  - platform: numeric_state
    entity_id: sensor.p1_meter_active_power_l1
    id: sensor.p1_meter_active_power_l1_250W
    below: '400'
  condition: []
  action:
  - type: turn_off
    device_id: 989bef2e3f3920921dc7d08768001cb1
    entity_id: light.my_n00_p01_light_l23_marokko
    domain: light
  mode: single