Created
January 5, 2023 09:58
-
-
Save tathamoddie/972a5666d6b025ef02ef7d55bc186f9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: "[Washing] Done" | |
description: "" | |
trigger: | |
- platform: numeric_state | |
entity_id: sensor.washing_machine_power | |
for: | |
hours: 0 | |
minutes: 0 | |
seconds: 0 | |
above: "500" | |
condition: [] | |
action: | |
- variables: | |
start_energy: "{{ states('sensor.washing_machine_energy') }}" | |
- wait_for_trigger: | |
- platform: state | |
entity_id: | |
- sensor.washing_machine_power | |
to: "0" | |
for: | |
hours: 0 | |
minutes: 5 | |
seconds: 0 | |
continue_on_timeout: false | |
- variables: | |
end_energy: "{{ states('sensor.washing_machine_energy') }}" | |
- service: notify.everyone | |
data: | |
title: 🫧 So Fresh and So Clean | |
message: Washing is done. Used {{ (end_energy - start_energy)|round(2) }}kWh. | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment