This blueprint allows you to monitor the activity of a home appliance based on its power consumption (in watts) and trigger actions based on start, running, and stop events. You can configure the entities for power and energy consumption, as well as set thresholds for starting and finishing. You can use the variables {{ elapsed_time }}, {{ energy_used }}, and {{ event_type }} in all the steps (start, running, and stop).
The purpose of this blueprint is to be simple and use variables to determine the duration and energy consumption while the appliance is running, using the least number of input_texts possible. There are other solutions available on the forum, but none of them met this specific scenario that I needed. If there’s a better way to achieve this, please don’t hesitate to let me know.
Features
Monitors power consumption (in watts) of a home appliance.
Triggers actions based on start, running, and stop events.
Configurable starting and finishing power thresholds.
Stores elapsed time and energy data.
Variables {{ elapsed_time }}, {{ energy_used }}, and {{ event_type }} available in all steps (start, running, and stop).
Inputs
power_entity: Entity representing the power consumption of the appliance (sensor domain).
energy_entity: Entity representing the energy consumption of the appliance (sensor domain).
start_threshold: Power threshold above which we assume the appliance has started (default: 1 W).
finish_threshold: Power threshold below which we assume the appliance has finished (default: 1 W).
elapsed_time_energy_data: Input text entity to store the elapsed time and energy data (input_text domain).
on_start: Actions to perform when the appliance starts.
on_running: Actions to perform when the appliance is running.
on_stop: Actions to perform when the appliance stops.
Usage
To use this blueprint, simply import it into your Home Assistant instance using the following GitHub link:
After importing, create a new automation using this blueprint, select the appropriate entities and actions for your use case, and enjoy your new appliance power monitor!
If you have any questions or feedback, please let me know in the comments below.
Looks very good @Jhonattan-Souza , i am kinda confused on what is the difference between power and energy… can you provide an example?
Also a good idea would be to calculate the cost of the specific usage based on the cost value set on the energy dashboard, then push notification that includes the cost when job is finished
can this be done?
nice
i’m quite new to home assistant so i do have a question.
In ‘Elapsed Time and Energy Data Input text entity to store the elapsed time and energy data.’ no entities show up, so how do i create this entity?
I was having a hard time getting this to work initially. The automation would register that it had been triggered, but the actions were not being performed.
Eventually I worked out the problem was my input_text helper default settings was set to ‘max: 100’. I could see there were no events in the log and nothing was being stored in here. As soon as I changed this to 1000 the blueprint started working perfectly and the actions were performed when triggered.
Exactly the same issue here. Can I suggest to avoid user confusion you update the elapsed_time_energy_data: entry to something like. elapsed_time_energy_data : Create under Settings->Devices & Services->Helpers a Text helper with maximum length 1000 then select this helper from the drop down menu (input_text domain)
Hi,
great work! I do have some questions about how to do some things.
Is it possible to create a statuscard in a dashboard for what the appliance is doing. E.g. Off/On/Running? And how? the sensor is a text sensor so it is not that straightforward?