I have an automation that ends with a single light.turn_on action
- action: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.example_light
I would like to conditionally add a brightness value to its data, behind a simple template
data:
brightness_pct: "{{ a_brightness_variable }}"
but only if it's an integer (has been defined as an integer), otherwise anexpected floaterror pops up.
How can I go around doing that? I can't duplicate the light turn on action since it's got quite a few branches and other (non optional) parameters set on the way.