Switching the socket automatically from a certain power of the inverter

Hello all,

First of all. I have already carried out several automations via the HomeAssistant gui, which all work perfectly.

Now I would like to automate the switching of a wireless-controlled socket. I would like to measure the current power of the inverter and then always switch on the socket when the wattage is over 1000. Unfortunately, this does not work and I do not know why.

Here is an excerpt from the yaml file:

- id: '1652715115908'
  alias: Switch on heating element
  description: Switch on heating element above a certain wattage.
  trigger:
  - type: power
    platform: device
    device_id: eacd0eefa2cebd91aa6e70973f7f2322
    entity_id: sensor.power_photovoltaics_fronius_power_flow_0_http_192_168_178_48
    domain: sensor
    above: 1
  condition: []
  action:
  - type: turn_on
    device_id: 41997139f8a4a92bc6b7279d754b3d4e
    entity_id: switch.osram_plug_01_f6fb0f00_on_off
    domain: switch
  mode: single

Thanks in advance for your help.

Hi :wave:!
I know nothing about device triggers, but I know the entity’s sensor.power_photovoltaics_fronius_power_flow state is in Watt not kW - so try above: 1000

Else try to use the state of the entity as trigger instead of the device.

Thank you for the answer. I am clear about the watts and kw. I have already tried values above 1000 - unfortunately without success. And the state thing doesn’t work either, unfortunately.

I somehow have the feeling that Home Assistant cannot read out the value of this entity correctly or interprets it differently?

This, created from GUI, works perfectly fine for me 🤷

trigger:
  - type: power
    platform: device
    device_id: bb814feb3a9ffb671c6fffbc830a2825
    entity_id: sensor.power_photovoltaics_fronius_power_flow_0_http_10_1_2_5
    domain: sensor
    above: 1

How could I debug the whole thing in a meaningful way?