How to make an action if numberic state is lowering or rising

Dear All,
I have two problems to resolve:
First, I have a pump that starts working at a level of the target liquid container and stops at different level. I can not put a level sensor on the sucking container so when the sucking container become empty and the pump must stop i do not have this information.
So I need an automatisation when the pump is on and the numbering state of the sensor level is
not rising for 10 sec , pump must stop.
The second, i made a dryer and there is a heater and other stuffs . But this heater i want to switch off when temperature starts rising, because the thermal hysteresis is very strong.

Can anyone help me with these problems?

It will be very good if in visual editor we can choose changes or not changes or positive or negative changes on variables

First one:

triggers:
  - trigger: state
    entity: sensor.tank_level
    not_to:
      - unknown
      - unavailable
    for: 30 # seconds at stable state, adjust as necessary.
conditions:
  - condition: state
    entity_id: switch.pump
    state: 'on'
actions:
  - action: switch.turn_off
    target:
      entity_id: switch.pump

For the second one detect a large heat rise with this:

And trigger when that changes state to on.

Thank You for the fast response. I shall try and let You know.

I think the first answer is not correct,
because the sensor will not become unavailable or unknown.
The sensor will not change its numeric state in such a case

the second one I tried but with no success. There are no videos in the net how to use this trend

That’s not how the first trigger works. It will trigger when the state stays the same for 30 seconds for any state except unavailable or unknown. So for example if it stays at 90% for 30 seconds or 42% for 30 seconds it will trigger. But if it stays at unknown or unavailable for 30 seconds it will not trigger.

What don’t you understand about the instructions in the trend sensor documentation?

Share what you tried and tell us what rise over what time you want to trigger at.