Ultimate Power Saving Blueprint! Lets do this together

Hi there,
my scripting skills are limited, but i can use chat gpt to refine my requirements.

So maybe someone finds this interesting and is willing to develop this automation.
So in the example we have a washingmaschine, but it could also be a dishwasher or other power consuming (dryer) device that needs a full cycle to run. I am looking a little bit in the direction of @leofabri, because you already have a similar blueprint ready.

Requirements for a Blueprint in Home Assistant to Monitor and Control the Washing Machine

Objective

The blueprint should monitor the power consumption of a washing machine and detect when it is turned on. If the washing machine operates at a high electricity price, it should be turned off until the price drops.

Functional Requirements

  1. Power Consumption Monitoring
  • The blueprint should continuously monitor the power consumption of the washing machine.
  • A configurable threshold defines when the washing machine is considered “on.”
  1. Electricity Price Monitoring
  • Check a variable (input_select.electricity_price) for defined values (CHEAP, NORMAL, EXPENSIVE).
  • If the electricity price is NORMAL or EXPENSIVE, automatically turn off the washing machine.
  • Wait until the price is CHEAP before turning the washing machine back on.
  1. Status Representation
  • The current status of the washing machine should be represented via an input field (input_boolean.washing_machine_status).
  • The status should distinguish between “off,” “on,” and “waiting.”
  1. Restart Behavior
  • The blueprint must automatically reactivate after a Home Assistant reboot or restart.
  • All configurations and states should be retained.
  1. Notifications and Actions
  • Users should be able to receive notifications for various status changes (e.g., “washing machine on,” “electricity price too high,” “washing machine off”).
  • Flexible actions should be definable, such as notifications via email, push notifications, or other Home Assistant actions.

Non-functional Requirements

  1. Robustness and Fault Tolerance
  • The blueprint must ensure stability even in case of a home assistant reboot or manual control of the waschingmaschine
  1. User-Friendly Configuration
  • Configuration parameters should be well-documented and easily adjustable.
  • A clear user interface for configuring and monitoring the washing machine status and electricity price should be provided.
  1. Performance
  • The blueprint should operate efficiently and not pose a significant load on the Home Assistant system.

Additional Requirements

  1. Configurable Time Span
  • The time span for monitoring power consumption should be configurable.
  1. Manual Control Option
  • Users should have the ability to manually turn the washing machine on or off, regardless of the current electricity price.
  1. Historical Logging
  • The power consumption and electricity price history should be recorded to provide historical data for analysis.
  1. Scenario Support
  • The blueprint should support various scenarios, such as “always keep the washing machine on,” “only run the washing machine when electricity is cheap,” etc.
  1. Test and Simulation Mode
  • A test or simulation mode should be available to test the blueprint without performing real actions.

Final Remarks

This blueprint aims to enable efficient monitoring and control of the washing machine to save electricity costs and optimize operation. Due to its configurability and flexibility, it can be adapted to various needs and scenarios.

1 Like

So the right way to write a Blueprint, well let’s call it best practice and the method suggested in the docs, is to write an automation or script that does a simplified version of that you want first, then add the blueprint magic sauce. Getting the logic working is not always easy, and becomes obfuscated in all that variable substitution stuff, making everything frustrating.
Get what you want working, then make the blueprint out of that by adding the !inputs and variables and such. Try to avoid device triggers and selectors. You can make them work, but people tend to struggle with those when dealing with them outside of the GUI editor context.
Creating an automation blueprint - Home Assistant.

2 Likes

Give this blueprint a look as it might just do most of what you want. And with the new HA “take control” feature for blueprints you can easily adjust it as you need to.