Hello all.
first of all - i’m new to home assistant and no native english speaker, so i hope i’m able to explain my problem good enough.
I’m stuck with an automation that uses the ‘choose’ option to check what to do every minute and when the right conditions pass, it shall use a REST command to write a value into my heating system.
Using the REST command from other automations, that doesn’t start a ‘sequence’, but an ‘action’ works absolutely fine. Using the REST command from the developer tools/services tab, works fine also.
But since i rewrote my automation using ‘choose’ and therefore putting the service call after a ‘sequence’, the REST command isn’t working. This is the code:
- id: heizungstatus_nach_anwesenheit
alias: Heizungsstatus jede Minute Prüfen und nach Anwesenheit Und Zeitprogramm setzen
trigger:
- platform: time_pattern
minutes: /1
action:
- choose:
- conditions:
- condition: time
alias: "Zwischen 22:59 Uhr und 05:01 Uhr - Zeitprogramm - tue nichts"
after: " 22:59:00"
before: " 05:01:00"
sequence:
- service: homeassistant.update_entity
- conditions:
- condition: and
alias: "wenn niemand zuhause und Heizung auf Komfort, setze Heizung auf reduziert"
conditions:
- alias: "niemand zu Hause"
condition: state
entity_id: sensor.jemand_zu_hause
state: 'False'
- alias: "Heizungsstatus auf 114 - Heizbetrieb Komfort"
condition: state
entity_id: sensor.bsb_lan_status_heizkreis
state: "114 - Heizbetrieb Komfort"
sequence:
- service: rest_command.bsb_lan_set_parameter
data:
parameter: 701
value: 1
- conditions:
- condition: and
alias: "wenn jemand zuhause und Heizung auf reduziert oder nachlauf, setze Heizung auf Komfort"
conditions:
- condition: state
alias: "jemand zu Hause"
entity_id: sensor.jemand_zu_hause
state: 'True'
- condition: or
conditions:
- condition: state
alias: "Heizungsstatus auf 120 - Absenkung Reduziert"
entity_id: sensor.bsb_lan_status_heizkreis
state: "120 - Absenkung Reduziert"
- condition: state
alias: "Heizungsstatus auf 17 - Nachlauf aktiv"
entity_id: sensor.bsb_lan_status_heizkreis
state: "17 - Nachlauf aktiv"
sequence:
- service: rest_command.bsb_lan_set_parameter
data:
parameter: 701
value: 0
The REST command in configurations.yaml, but like i said, it’s working fine when started as ‘action’
rest_command:
bsb_lan_set_parameter:
url: http://192.168.178.109/JS
method: POST
username: !secret bsb_lan_user
password: !secret bsb_lan_pass
# Parameter "type": 1 = SET (default), 0 = INF
payload: '{"Parameter": "{{ parameter }}", "Value": "{{ value }}", "Type": "{% if type is defined %}{{ type }}{% else %}1{% endif %}"}'
content_type: "application/json; charset=utf-8"
Surely its just a small thing, but i searched for two days now and i do not find any solution and tbh - i really do not understand, why its not passing the values. looking into the automation path, everything looks fine for me, it picks the right path and tells me the right step details - but nothing happens.
Anyone there who can help out? Thanks very much.
Home Assistant core-2021.8.5 is installed as Docker on an Synology Diskstation