#Hey I have a few esphome based
1 messages · Page 1 of 1 (latest)
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.washing_machine
to: "on"
condition: []
action:
- variables:
start_energy_wm: "{{ states('sensor.smart_plug_2_kwh') }}"
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.washing_machine
from: "on"
to: "off"
for:
hours: 0
minutes: 5
seconds: 0
continue_on_timeout: false
- variables:
end_energy_wm: "{{ states('sensor.smart_plug_2_kwh') }}"
- if:
- condition: state
entity_id: group.presence
state: home
then:
- parallel:
- if:
- condition: state
entity_id: person.person1
state: home
then:
- service: notify.mobile_app_person1
data:
message: >-
Washing machine has finished. Used {{ (end_energy_wm -
start_energy_wm)|round(2) }}kWh, or around ${{
((end_energy_wm - start_energy_wm)* 0.24)|round(2) }}.
- if:
- condition: state
entity_id: person.person2
state: home
then:
- service: notify.mobile_app_person2
data:
message: >-
Washing machine has finished. Used {{ (end_energy_wm -
start_energy_wm)|round(2) }}kWh, or around ${{
((end_energy_wm - start_energy_wm)* 0.24)|round(2) }}.
mode: single```
the config for the binary_sensor.washing_machine is
template.yaml
- name: "Washing Machine"
icon: >
{% if is_state("binary_sensor.washing_machine", "on") %}
mdi:washing-machine
{% else %}
mdi:washing-machine-off
{% endif %}
state: "{{ states('sensor.smart_plug_2_current_consumption')|float(0) > 1 }}"
device_class: running
delay_off:
minutes: 15
@glossy canopy thanks that looks promising, I will give it a try. Honestly, I am always confused at which point one should go with something like an own script or node-red and what could be implemented by the native HA system.
@glossy canopy also 0.24Euro/kWh make me jealous 😉
That’s Australian dollars, so even cheaper still
slightly different, but our washer and dryer are upstairs here in the US, so we have a rule that triggers a message to "switch out laundry" that we like quite well. It triggers when the washer and dryer have booth been finished for a period of time. When the dryer finishes for example, it flips a boolean. When the booleans for both washer and dryer are on, it sends a message to switch out laundry, then resets the booleans to false.
description: ""
trigger:
- platform: time_pattern
seconds: "30"
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.laundry_washer_finished
state: "on"
- condition: state
entity_id: input_boolean.laundry_dryer_finished
state: "on"
action:
- service: notify.mobile_app_iphone_11
data:
message: Switch Out Laundry
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.laundry_dryer_finished
- input_boolean.laundry_washer_finished
- service: notify.mobile_app_gunther
data:
message: Switch out laundry
mode: single```