Hi,
I’m new to HA.
One of my automations has a bad behavior and I cant’t explain it to me.
I have two thermostats and two windoswitches in my room via ziggbee2mqtt.
If the window is opend and it is below 16°C the thermostats have to change to openwindow_on.
If both switches are closed the openwindow changes to off and an automation is triggered to select the temperature in the shedule.
The first step works fine but after 1 second the state of thermostat 2 changes back. The log says it is triggerd by switch 1. But this wasen’t defined.
What can I do?
alias: WOZI_openwindow
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.schalter_1_contact
- binary_sensor.schalter_2_contact
for:
hours: 0
minutes: 0
seconds: 30
condition:
- condition: numeric_state
entity_id: weather.openweathermap
attribute: temperature
below: 16
action:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.schalter_1_contact
state: "on"
- condition: state
entity_id: binary_sensor.schalter_2_contact
state: "on"
sequence:
- type: turn_on
device_id: ade355b2f765de16dacf35443dbebabb
entity_id: switch.wozi_thermostat_1_open_window
domain: switch
- type: turn_on
device_id: 833efe512fe9983fce4796f1ebd451db
entity_id: switch.wozi_thermostat_2_open_window
domain: switch
- conditions:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.schalter_1_contact
state: "off"
- condition: state
entity_id: binary_sensor.schalter_2_contact
state: "off"
sequence:
- type: turn_off
device_id: ade355b2f765de16dacf35443dbebabb
entity_id: switch.wozi_thermostat_1_open_window
domain: switch
- type: turn_off
device_id: 833efe512fe9983fce4796f1ebd451db
entity_id: switch.wozi_thermostat_2_open_window
domain: switch
- service: automation.trigger
data: {}
target:
entity_id:
- automation.wozi_openwindow
mode: single
"logbookEntries": [
{
"name": "WOZI_openwindow",
"message": "triggered by state of binary_sensor.schalter_1_contact",
"source": "state of binary_sensor.schalter_1_contact",
"entity_id": "automation.wozi_openwindow",
"context_id": "01GKF6GXSX4PMTBEKRM8VRM7QZ",
"when": 1670178699.071073,
"domain": "automation"
},
{
"when": 1670178699.113309,
"state": "on",
"entity_id": "switch.wozi_thermostat_1_open_window",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "WOZI_openwindow",
"context_message": "triggered by state of binary_sensor.schalter_1_contact",
"context_source": "state of binary_sensor.schalter_1_contact",
"context_entity_id": "automation.wozi_openwindow"
},
{
"when": 1670178699.242274,
"state": "on",
"entity_id": "switch.wozi_thermostat_2_open_window",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "WOZI_openwindow",
"context_message": "triggered by state of binary_sensor.schalter_1_contact",
"context_source": "state of binary_sensor.schalter_1_contact",
"context_entity_id": "automation.wozi_openwindow"
},
{
"when": 1670178700.037246,
"state": "off",
"entity_id": "switch.wozi_thermostat_2_open_window",
"context_event_type": "automation_triggered",
"context_domain": "automation",
"context_name": "WOZI_openwindow",
"context_message": "triggered by state of binary_sensor.schalter_1_contact",
"context_source": "state of binary_sensor.schalter_1_contact",
"context_entity_id": "automation.wozi_openwindow"
}
]
}