Check if power is below 2W and send notification automation

Hello there,

What I am trying to achieve: I have a blitzwolf shp13 zigbee plug, which has 3 different entities. One is for on/off, other is for total consumption in kWh, last one is current consumption (Watts). I need it to send me notification if it drops below 2W, indicating that the device I was charging is fully charged. I am trying to create a sensor that check if its below 2W (that being the TRUE state) or if not below 2W (FALSE state).
The sensor I created appears fine and I get no errors in config, but it always stays at TRUE, no matter if it is at 0 watts or 100 watts or anywhere in between. What am I doing wrong? Code and picture of device sensor and my created sensor below.

  - platform: template
    sensors:
      charging_done:
        friendly_name: 'Charging done'
        entity_id: 
          - sensor.charging_station_wattage
        value_template: "{{ states('charging_station_wattage') | float < 2 }}"

If 0 watts


If anything more than 2 watts

states('charging_station_wattage') should be states('sensor.charging_station_wattage')
Also, you don’t need the entity_id: parameter in the template sensor config.

In fact, you don’t need a template sensor at all for this. You could just use a numeric state trigger.

Yep, i didnt need a template sensor at all. Rookie mistake. Thank you.

Looks like you got this, but here is what I do for a similar situation:

- id: '1600742764895'
  alias: Govee MasterBed Off
  description: Turn Govee off when TV is off
  trigger:
  - type: value
    platform: device
    device_id: 056905d6fc6a11eaa10c119d0428e8e8
    entity_id: sensor.aeon_labs_zw096_smart_switch_6_power
    domain: sensor
    above: 0
    for:
      hours: 0
      minutes: 0
      seconds: 30
    below: 30
  condition: []
  action:
  - type: turn_off
    device_id: 9c47418f0c0b11eb80f6af0639fb12d6
    entity_id: light.h6104_22dc
    domain: light
  mode: single