I want to make a template switch for the motor tilt on my boat that checks if the jackplate (for lifting the motor) is at the top (with a coil spring limit switch) and executes if it is. If the jackplate isn’t at the top, it should wait for up to 30 seconds for the jackplate to reach the top and then execute for 25 seconds. If it starts to tilt before the jackplate is in the top position, the steering cylinder will hit the transom, which can damage it.
But I’m starting to wonder if maybe the wait_until action doesn’t work as I thought? Here’s the template switch:
- platform: template
name: "Tilt up-switch"
id: tiltupswitch
turn_on_action:
wait_until:
condition:
binary_sensor.is_on: jackplatetop #binary sensor with a coil spring limit switch
timeout: 30s
- switch.turn_on: tiltup #Relay for tilt up
- delay: 25s
- switch.turn_off: tiltup #Relay for tilt up
Can somebody help me out a bit here? I get:
ERROR Error while reading config: Invalid YAML syntax:
while parsing a block mapping
in "hekk.yaml", line 356, column 7:
wait_until:
^
expected <block end>, but found '-'
in "hekk.yaml", line 360, column 7:
- switch.turn_on: tiltup
^