Witam ostatnio zauważyłem że czasami jest w logu automatyzacja została już wyzwolona i nie wiem co jest przyczyną. Jedną automatyzację miałem tak zrobioną ale chciałem wykorzystać "jeżeli " żeby było bardziej poprawniej więc która automatyzacja jest poprawna lub zbliżona do poprawnej
Pompa kotlownia
id: '16864208
alias: Pompa kotlownia
description: ''
triggers:
- type: temperature
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: sensor.tasmota_ds18b20_1_temperature
domain: sensor
below: 33
trigger: device
- type: temperature
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: sensor.tasmota_ds18b20_1_temperature
domain: sensor
above: 30
trigger: device
- value_template: '{{float(states(''sensor.tasmota_ds18b20_1_temperature''))>30}}'
trigger: template
- value_template: '{{float(states(''sensor.tasmota_ds18b20_1_temperature''))<33}}'
trigger: template
conditions: []
actions:
- if:
- condition: device
type: is_on
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
- type: is_temperature
condition: device
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: sensor.tasmota_ds18b20_1_temperature
domain: sensor
below: 34
- condition: template
value_template: '{{float(states(''sensor.tasmota_ds18b20_1_temperature''))<34}}'
then:
- type: turn_off
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
else: []
- if:
- condition: device
type: is_off
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
- condition: template
value_template: '{{float(states(''sensor.tasmota_ds18b20_1_temperature''))>29}}'
then:
- type: turn_on
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
mode: single
A tutaj z " jeżeli" będę wdzięczny jeżeli ktoś poprawi lub podpowie co zrobić aby było poprawnie.Nadmieniam.ze wszystko działa ale.nie wiem czy nie jest za dużo wyzwalaczy.
Wykorzystałem template oraz encje temperatury powyżej i poniżej jakby Template nie zadziałał bo by miał już wartość true a pompka byłaby zgaszona.
alias: Pompa test
description: ""
triggers:
- type: temperature
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: sensor.tasmota_ds18b20_1_temperature
domain: sensor
below: 33
trigger: device
- type: temperature
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: sensor.tasmota_ds18b20_1_temperature
domain: sensor
above: 30
trigger: device
- value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))<31}}"
trigger: template
- value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))<33}}"
trigger: template
- value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))>30}}"
trigger: template
- value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))>35}}"
trigger: template
- value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))>40}}"
trigger: template
conditions: []
actions:
- if:
- condition: device
type: is_on
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
- condition: or
conditions:
- condition: template
value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))<34}}"
- type: is_temperature
condition: device
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: sensor.tasmota_ds18b20_1_temperature
domain: sensor
below: 34
then:
- type: turn_off
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
enabled: true
else: []
- if:
- condition: device
type: is_off
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
- condition: template
value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))>29}}"
- condition: or
conditions:
- condition: or
conditions:
- condition: template
value_template: "{{float(states('sensor.tasmota_ds18b20_1_temperature'))>30}}"
- type: is_temperature
condition: device
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: sensor.tasmota_ds18b20_1_temperature
domain: sensor
above: 30
then:
- type: turn_on
device_id: acf8f5bbd3f2fe3bcdcdf3445545621f
entity_id: switch.sonofftemp
domain: switch
enabled: true
mode: single
Chciałbym aby automatyzacja była zrobiona jak teraz np pompka włączona obniżenie temperatury i pompka wyłącz a jeżeli pompka wyłączona a temperatura powyżej to pompka włącz.
A.tutaj.log
homeassistant.components.automation.nowa_automatyzacja_2
Źródło: helpers/script.py:2041
integracja: Automatyzacja
Pierwsze zdarzenie: 14:26:31 (1 zdarzenia)
Ostatnio zalogowany: 14:26:31
Pompa test: Already running
Wyzwolony przez sensor.tasmota_ds18b20_1_temperature via template o 24 stycznia 2025 14:41:31
Zatrzymano, ponieważ tylko pojedyncze wykonanie jest dozwolone o 24 stycznia 2025 14:41:31 (czas wykonania: 0.00 sekund)