Threshold helper right upper, lower and hysteresis bounds

Hey,
i would like to switch a power plug with my current power consumption. The first step is to create a threshold helper.
If my power consumption is <= -200 W the threshold state should switch to “on”.
If my power consumption reaches >= 125 W the threshold state should switch to “off”

I think i need a hysteresis for this. If i only assign the lower (-200 W) and the upper (125 W) border. The state switches to “on” if i go under 125 W but this is not right.

Now im trying it with this settings lower and upper border 125 and a hysteresis of 325.
But now the state is nearly always “on”

Can you help me with the right borders ?

Best regards
Kai

Look at the bottom right graph.

This should turn on at -200 and off at 125:

binary_sensor:
  - platform: threshold
    name: Your Name Here
    entity_id: sensor.your_sensor_here
    lower: -37.5
    hysteresis: 162.5

How to calculate:

  • Take the average of your two switch-point values. This is your lower setting.
  • Work out the difference between the average and one of your switch-point values. This is your hysteresis.
2 Likes