I am trying to regulate the li-ion battery charger of my bicycle using an athom smart plug (tasmota version).
If the battery no longer charges, the charger uses 10 Watts.
If I connect the empty battery, the charger uses a maximum of 100 watts.
I have a variable called input_number.wattage_min with a value of 10 and a variable input_number.wattage_max with a value of 100.
I also measure the current wattage in the variable sensor.athom_plug_energy.current.
I’m trying to come up with a node red flow that turns off the smart plug when the measured wattage falls below 10W or above 100W.
I can’t figure it out. Can someone help me on my way?
An additional problem is that when I turn on the smart plug, it is immediately turned off again because the flow I am trying says that the wattage is immediately below 10 at the start.