Get boiler, dryer und washing machine status through consumption or temperature

dear all,

challenge a):
I do have a dryer and washing machine which are contected to a Plug where shelly relais with consumption measurement are installed. Working fine so far. I have created one boolean helper for each device, “input_boolean.trockner” and “input_boolean.waschmaschine”.
Depending on the consumption these booleans shall be “on” or “off”, where"on" shall be while a programm is running. This is a little bit tricky, because the washer sometimes just waits for while without consuming electricity to get the landry soked with water and soap. The dryer has an anti creasing function meaning, when a programm has finsihed the tuble turns every few minutes about one turn.

Mathematicaly I can solve the issues, but I am not able to transfer this into yaml code.
What I do need is the following in yaml code for value templates:

This are the typical consumption behaviours of the devices:

washing machine:
The Standby consumption seem not be measurable, shelly still shows 0W.


zommed into one of them:

This one seems to be quite easy. It seem like the following conditions apply when “on”:

  • consumption > 0
  • may it is possible that it goes about 0 for a short period of time. Therefore I would like to something like: “input_boolean.waschmaschine” is “on” when the consumption is greater equal 1, execepted when 0 is only about 10 seconds

Dryer:


zommed in:

This one is a bit more tricky. Here I need something like “input_boolean.trockner” in “on” when consumption is greater then ~1W, except vaules that ocur only for ~10 seconds.

challenge b):
There is temperature sensor on a pipe coming from my boilerl. I want the “input_boolean.boiler” always to be on, when the gradient is positive and grather than a certain value for example 20/12 = 1,6 so lets say grater than 0.5 (because I dont want it to be on when it gets one degree warmer in my basement :wink:


zommed in:

Now I am really excited about your answers :wink:

Best Michael

You can use the example listed in the binary sensor template help.

# Determine when the washing machine has a load running.
binary_sensor:
  - platform: template
    sensors:
      washing_machine:
        friendly_name: "Washing Machine"
        delay_off:
          minutes: 5
        value_template: >-
          {{ states('sensor.washing_machine_power')|float > 0 }}

This example creates a washing machine “load running” sensor by monitoring an energy meter connected to the washer. During the washer’s operation, the energy meter will fluctuate wildly, hitting zero frequently even before the load is finished. By utilizing delay_off , we can have this sensor only turn off if there has been no washer activity for 5 minutes.

I’ve got something similar set up for my washing machine and dishwasher, although i need to do some more tweaking to it because i see an occasional power fluctuation (even when the device is off) which sometimes sets the binary sensor to on.

1 Like

does anybody havbe ab idea for challenge b) ? see picture above.

There is temperature sensor on a pipe coming from my boilerl. I want the “input_boolean.boiler” always to be on, when the gradient is positive and grather than a certain value for example 20/12 = 1,6 so lets say grater than 0.5 (because I dont want it to be on when it gets one degree warmer in my basement.

Use the trend sensor:

Here’s an example I use — the phone running Fully Kiosk Browser sometimes goes into a high power draw condition, needing a restart. Binary sensor that indicates the problem:

- platform: trend
  sensors:
    fkb_restart_needed:
      entity_id: sensor.kitchen_display_battery_level
      friendly_name: 'Kitchen display high power draw'
      min_gradient: -0.0035
      max_samples: 5
      device_class: problem

Automation:

- alias: Misc - kitchen display restart

  description: >-
    Kitchen display is a phone running Fully Kiosk Browser.
    Sometimes, it gets locked into an abnormally high power
    draw condition. This automation uses a trend sensor (see
    binary_sensors.yaml) as a trigger to send a restart command.

  id: 5d2b119e-dd19-4ab0-a580-b097558a0253

  trigger:
    - platform: state
      entity_id: binary_sensor.fkb_restart_needed
      to: 'on'
      for:
        minutes: 15

  action:
    - service: shell_command.kitchen_restart

That sounds great. thank you, I’ll try it out and come back!