Hello,
I wanted to make an automation that will turn on my electric heater (for towels) under certain conditions.
If the heat pump is in DHW mode, then after a long press of the button, rember that and wait for either a corresponding level of energy production from PV or until a cheap electricity tariff occurs and then turn on the heater.
alias: Zigbee2MQTT - Tuya 4-Button Scene Switch2
description: ""
use_blueprint:
path: Stringer/zigbee2mqtt-tuya-4-button-scene-switch-ts0044.yaml
input:
button_one_short_press:
- type: toggle
device_id: 89be57ec2d649761b73bcffb0f9d4643
entity_id: switch.lazienka_lustro
domain: switch
switch: sensor.wlacznik_lazienka_action
button_four_long_press:
- if:
- condition: state
entity_id: sensor.aquarea_mode
state: DHW
then:
- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.solaredge_current_power
above: 2000
value_template: "10000"
- type: turn_on
device_id: b814efe99894e92a15d7f72c832fae52
entity_id: 3c9baa4b32049beaecba1e62a4b08562
domain: switch
else: []
button_four_short_press:
- type: turn_off
device_id: b814efe99894e92a15d7f72c832fae52
entity_id: 3c9baa4b32049beaecba1e62a4b08562
domain: switch
button_four_double_press:
In this code I have not yet activated the variable( I still do not know how to do it) for the cheap tariff.
On the other hand, it doesn’t work for me .,…
I would like it to run only once, for turning off I have a suitable automation:
alias: Wyłącz po czasie Łazienka gniazdo grzejnik
description: ""
trigger:
- platform: state
entity_id:
- switch.lazienka_gniazdo_grzejnik
from: "off"
to: "on"
for:
hours: 0
minutes: 0
seconds: 15
condition: []
action:
- type: turn_off
device_id: b814efe99894e92a15d7f72c832fae52
entity_id: 3c9baa4b32049beaecba1e62a4b08562
domain: switch
mode: single
In addition, how to make the shutdown time can be set from lovelace?