Create bollean sensor based on value from analogue sensor

I want to create boolean sensors which will change state (on/off) based on value from Arduino current metter - I have this sensor allready define in conf.yaml.
sensor:

  • platform: mqtt
    name: “Arduino_sensor1”
    state_topic: “home-assistant/Arduino/Sensor1”
    unit_of_measurement: “A”

I have oven and microvave on same phase. So when microvave is on, current consumption is for instance up to 3 A, when oven is on, current consumption is for instance 7A.
I want to create two boolean sensors Sensor_oven, and Sensor_microwave.
Sensor_microwave is “on” if Arduino_sensor1 is 3A or 10A, else “off”.

How I can define such sensor?

1 Like