Open whodat opened 1 year ago
Had this idea, but using config template here does not seem to work either...
you can condition all options inside the hold/tap_action:
tap_action:
action: >
[[[ return variables.z_wave ? 'call-service' : 'call-service'; ]]]
service: >
[[[ return variables.z_wave ? 'zwave_js.refresh_value' : 'script.turn_on'; ]]]
service_data:
entity_id: >
[[[ return variables.z_wave ? 'sensor.' + variables.id + '_actueel' : 'script.' + variables.id + '_meterget_power'; ]]]
refresh_all_values: >
[[[ return variables.z_wave ? true : null; ]]]
Is it not possible to pass sub-properties conditionally?
If calling opensprinkler.stop, it should not pass "run_seconds" property at all (only opensprinkler.run needs it). I tried just passing null to the property and get this error.
(for some reason when I paste this as code within a code block, it removes line formatting)