This is an extract of my automation:
action:
[...]
# Per sicurezza, forzo su "off" il pressostato
- service: switch.turn_off
data:
entity_id: switch.lastricosolare_pressostatorabboccovasche
- service: switch.turn_on
data:
entity_id:
- switch.lastricosolare_generaleacqua
- switch.lastricosolare_rabboccovasche
- wait_for_trigger:
- platform: state
entity_id: switch.lastricosolare_pressostatorabboccovasche
from: "off"
to: "on"
for: "00:00:30"
timeout: "00:15:00"
let’s see it together:
- service: switch.turn_off
data:
entity_id: switch.lastricosolare_pressostatorabboccovasche
I force off the switch of our interest…
- service: switch.turn_on
data:
entity_id:
- switch.lastricosolare_generaleacqua
- switch.lastricosolare_rabboccovasche
Open the water…
- wait_for_trigger:
- platform: state
entity_id: switch.lastricosolare_pressostatorabboccovasche
from: "off"
to: "on"
for: "00:00:30"
timeout: "00:15:00"
Now I have to wait for the tanks to fill (and then the switch to go from “off” to “on” for 30 seconds) or at most 15 minutes
But this doesn’t happen since the extract of the automation tracks shows:
"action/6/then/2": [
{
"path": "action/6/then/2",
"timestamp": "2023-06-24T04:58:57.002319+00:00",
"result": {
"params": {
"domain": "switch",
"service": "turn_on",
"service_data": {
"entity_id": [
"switch.lastricosolare_generaleacqua",
"switch.lastricosolare_rabboccovasche"
]
},
"target": {}
},
"running_script": false,
"limit": 10
}
}
],
"action/6/then/3": [
{
"path": "action/6/then/3",
"timestamp": "2023-06-24T04:58:57.112794+00:00",
"result": {
"wait": {
"remaining": 833.8613884790102,
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "switch.lastricosolare_pressostatorabboccovasche",
"from_state": {
"entity_id": "switch.lastricosolare_pressostatorabboccovasche",
"state": "off",
"attributes": {
"raw_state": false,
"friendly_name": "LastricoSolare_PressostatoRabboccoVasche"
},
"last_changed": "2023-06-24T04:59:31.461254+00:00",
"last_updated": "2023-06-24T04:59:31.461254+00:00",
"context": {
"id": "01H3NWB285RQVV0EYBMB3CGNEM",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "switch.lastricosolare_pressostatorabboccovasche",
"state": "on",
"attributes": {
"raw_state": true,
"friendly_name": "LastricoSolare_PressostatoRabboccoVasche"
},
"last_changed": "2023-06-24T04:59:33.250633+00:00",
"last_updated": "2023-06-24T04:59:33.250633+00:00",
"context": {
"id": "01H3NWB402T9Z4H74ZQ0M654K8",
"parent_id": null,
"user_id": null
}
},
"for": {
"__type": "<class 'datetime.timedelta'>",
"total_seconds": 30
},
"attribute": null,
"description": "state of switch.lastricosolare_pressostatorabboccovasche"
}
}
}
}
],
"action/6/then/4": [
{
"path": "action/6/then/4",
"timestamp": "2023-06-24T05:00:03.255831+00:00",
"changed_variables": {
"wait": {
"remaining": 833.8613884790102,
"trigger": {
"id": "0",
"idx": "0",
"alias": null,
"platform": "state",
"entity_id": "switch.lastricosolare_pressostatorabboccovasche",
"from_state": {
"entity_id": "switch.lastricosolare_pressostatorabboccovasche",
"state": "off",
"attributes": {
"raw_state": false,
"friendly_name": "LastricoSolare_PressostatoRabboccoVasche"
},
"last_changed": "2023-06-24T04:59:31.461254+00:00",
"last_updated": "2023-06-24T04:59:31.461254+00:00",
"context": {
"id": "01H3NWB285RQVV0EYBMB3CGNEM",
"parent_id": null,
"user_id": null
}
},
"to_state": {
"entity_id": "switch.lastricosolare_pressostatorabboccovasche",
"state": "on",
"attributes": {
"raw_state": true,
"friendly_name": "LastricoSolare_PressostatoRabboccoVasche"
},
"last_changed": "2023-06-24T04:59:33.250633+00:00",
"last_updated": "2023-06-24T04:59:33.250633+00:00",
"context": {
"id": "01H3NWB402T9Z4H74ZQ0M654K8",
"parent_id": null,
"user_id": null
}
},
"for": {
"__type": "<class 'datetime.timedelta'>",
"total_seconds": 30
},
"attribute": null,
"description": "state of switch.lastricosolare_pressostatorabboccovasche"
}
}
},
Always exits as timeouted after a few seconds (not 15 minutes).
Where am I wrong?