šŸ”Œ Detect and monitor the state of an appliance based on its power consumption - V2.1.1 - Updated!

Hey hi! Unfortunately, I am unable to see anything wrong without additional information.

It could be that the finishing power threshold is not reached, or maybe, you may have set your time to a value that is too big and the sensor might be reading values that are > the finishing power threshold during that period. All appliances are different, and finding the right value could be hard sometimes.

What I need to help you is:

  1. The blueprint config (you can see that there is the section in the 2nd image you attached). Copy and paste it here in the forum
  2. The graph of the power consumption of the appliance during the cycle. Please take a screenshot
  3. More? Weā€™ll see
id: '1658693952680'
alias: Washer 2.o
description: ''
use_blueprint:
  path: leofabri/appliance-status-monitor.yaml
  input:
    appliance_socket: switch.washer_power
    appliance_power_sensor: sensor.washer_power_electric_consumption_w
    appliance_state_machine: input_select.washer_state_machine
    appliance_job_cycle: input_button.washer_job_cycle
    delayed_job_completion_timer: timer.washer_delayed_job_completion_timer
    automation_self_trigger: input_button.washer_automation_self_trigger
    actions_job_cycle_ends: []
    appliance_finishing_power_threshold: 2

Let me know if anything sticks out at you!

Thanks!

I wasnā€™t expecting the graph to look like that, this is quite extreme. I love it!

I suspect that the appliance_finishing_power_threshold is never reached (because the power consumption stays above 2 Watts all the time). I might be wrong. But I canā€™t tell because the graph is not that detailed.

  • What is the power consumption of your washer in idle? Letā€™s sayā€¦ at 11:24
  • Is this the latest version of the blueprint? V2.1.1

I can confirm that this blueprint runs flawlessly for my appliancesā€¦ there must be something off here

I was thinking the same thing, but at at 11:24 itā€™s .99 -.93 (it looks like it fluctuates a bit).

Then at 1:15 it does the same thing fluctuates between 1.09 - .99

Iā€™m running 2.1.1

Iā€™m still working on troubleshooting this, and one thing I noticed is that the Washer - Job Cycle button is/has been in an unknown state the whole time. Should something be happening tot hat button to trigger the on/off status of job_ongoing?

Hi @csjo, sorry for the late reply. What you are telling me now is not something of concern that should happen.
The input_button.washer_job_cycle is a fundamental part of the automation because it canā€™t work without it. Since itā€™s an input_button and a helper, the possible states are 0 or 1. Unavailable is not contemplated.

  • How did you create that helper entity? Was it through the .yaml packages or the UI?

If you did it with the packages method, your config should be:

# ...

input_boolean:
  washer_job_cycle:
    name: Washer - Job Cycle
    icon: mdi:washing-machine

# ...

Also, that button is used internally. You should never change that, as the automation needs to take care of it assigning it a value based on the status of the appliance. But the initial state cannot be unavailable

Hi, I created it via the gui. Here is a screen shot of it.

Oh no, itā€™s my fault! :sweat_smile:
In the documentation for the UI I wrote ā€œButtonā€ but the thing we need is actually an input_boolea, which in the UI is called Toggle. Itā€™s quite unclear to me why they called it like that.

To fix:

  1. Please delete the input_button you showed to me in the last pic
  2. Create a Toggle instead. Call it Washer - Job Cycle, and then pair that entity in the automation
  3. It should finally work
    UPDATE: 4. Please do the same to the input_button.washer_automation_self_trigger entity. It has to be a Toggle (input_boolean) as well

Such a small mistake made this unusable. Iā€™m so sorry about that. Iā€™m updating the documentation

Awesome! the state is now Idle so that looks to have fixed the issue. Iā€™ll give the machine a test cycle and see how it handles.

I appreciate your time!

1 Like

I canā€™t tell you how many attempts Iā€™ve mad at something like this, from doing it myself to using other peopleā€™s solutions, and Iā€™ve been frustrated with success. I installed this last night and have done a test run on my washing machine andā€¦it just works. My machine used to trip up other integrations as even in standby it would fluctuate between 0w and about 5w (no idea why, seems a waste of electricity to me) which would cause the status to fluctuate between ā€œrunningā€ and ā€œfinishedā€. With minimal effort, your solution appears to have worked first time.

Iā€™ve also set up a dishwasher which I will test tonight and a tumble dryer. The latter is proving diffucult as it has an anti-crease cycle at the end which runs for about an hour which to my horror I spotted uses over 200w during each cycle (so the machine cycles between about 4w and about 200w until the machine is turned off OR the anti crease cycle times out at about one hour). Iā€™m not sure if I can do anything about this but to be fair this is a ā€œsmartā€ tumble dryer anyway so I can hook into the Home Connect integration to get the actual status - I just wanted all three appliances to use the same logic.

EDIT: great work BTW!!

1 Like

I have following error after copying the washing_machine.yaml file to package folder, before restart

"Configuration invalid!

Error loading /config/configuration.yaml: mapping values are not allowed here
in ā€œ/config/packages/washing_machine.yamlā€, line 28, column 66"
I have no knowledge of this coding, can anyone help

Hi @Laqwx! After creating the washing_machine.yaml package as specified, I can tell that it works correctly for me.
I suspect that you may have a problem with your indentation.

Here are my questions for you:

  1. Could you please show us how you set up the package support in your home assistant configuration.yaml?

  2. Are there any other packages created in your packages/ folder? If yes, do they work?

Please make sure that your indentation matches perfectly.

Thank you mate! Itā€™s always great to experience peopleā€™s appreciation. Iā€™m happy that this solution works for you :wink:

Regarding the tumble dryer, I donā€™t have anything like that at home, so mimicking that behavior isnā€™t really that easy for me.
As long as you have start & finishing power thresholds set correctly, it should work. You might have to use the Delayed Job Completion duration variable to solve problems with variable power consumption, something that might trigger the job_completed state, even if the appliance is not really done.

Cheers!

1 Like

1, I have this in my configuration.yaml
image
2, I have keymaster folder under packages, and the keymaster works fine.

In the washing_machine.yaml file, what is written on line 28?

My file, and the one on github only has 27 lines, so check and see if you managed to change it more than you should have :slight_smile: that is sooooo easy to do, trust me.

1 Like

just coming across this blueprint. and now after seeing your use case it intrigues me to give it a shot. while im not in your current situation with archaic hardware, i do have a similar situation. my kitchen appliances are all on one circuit. so when the dishwasher or microwave is on, its not a good idea to start up the air 1850watt air fryer. Even though my dishwasher has digital controls, i have found that it does remember its current cycle state and will start right back up if the power is cycled. Since it takes so long to complete a load you may need to use the kitchen and forget that it could trip the breaker. I see in this blueprint the possibility to be able to toggle the dishwasher when other devices are started.

1 Like

thanks for the hint, I double checked the file, it was the wrong file that I use wget to download it to the package folder. for some reason it changed the inside content after the Wget.
I use Vscode manually copy and paste then everything works

2 Likes

Hi @wbarber69! Yes, you can build something that interlocks other appliances so that they donā€™t work concurrently. Please remember that if you want to detect an overload, youā€™ll need to add HA_PowerControl to the equation. However, if you are looking for the first thing, this blueprint is a standalone solution.

My dishwasher is smart enough to remember where it was when it turned off. That is a nice feature for sure. At least I donā€™t have to worry about that.


There are a lot of possible use cases for this automation.

For example, I noticed that when my TV & Nvidia Shield are off but powered, they somehow waste about 20Watts of energy. When the TV is on, itā€™s about 40/50 Watts.
With this solution, I can detach them completely and save some energy

1 Like

im already doing that with a lot of my parasitic appliances. I dont need overload as it wouldnt even matter because the circuit would trip before id get an overload warning.

thx for this awesome Blueprint!!
this one is one of my wishes