Virtual sensor driving by change of the numerical state value

Hi comunity i want to create virtual binary sensor (on/off) for show the device state, depends of power cunsumption , drive by chanching the numerical state of the some of other phisical sensor
washer current :
for example:
if value (numerical state) of the sensor.washer_machine_current change from 0 A to above 1.0 A than virtual sensor state set β†’ ON
and if value (numerical state) of the sensor.washer_machine_current change from above 1A to 0A than the virtual sensor state set β†’ OFF

how to create β€œsmart” automation , or it can be possible to do some of more easy way ?

thanks

You will need to create an Input Boolean.

template:
  - binary_sensor:
      - name: "Washing Machine"
        state: >-
          {{ states('sensor.washer_machine_current') | int >= 1 }}
1 Like

Great ! its works . many thanks ! it’s really more easiest way for .