I have optional inputs in my blueprint. I am making a motion + occupancy + light level activated light.
I have the following (relevant) inputs:
- Illuminance sensor - used to control if the light should turn on upon motion
- Entity-provided threshold - for dynamic light thresholds, an entity can be used to provide the maximum brightness of the illuminance sensor
- Fixed-number threshold - for fixed light thresholds, a number input that does not change
The illuminance checks should be completely optional, I want to skip parts of logic completely if these fields are not filled out.
- Occupancy sensor - used to keep the light turned on, even if there is no motion
This should be optional too, if not, these checks shouldn't exist.
I want something like:
input:
occupancy:
illuminance:
threshold_entity:
threshold_fixed:
trigger:
{% if is_defined(!input 'occupancy') %}
- type: state
entity_id: !input occupancy
from: "on"
to: "off
{% endif %}
action:
- if:
condition:
{% if is_defined(!input 'illuminance') %}
...
{% endif %}
then: ...