I would like to control a light using an Elgato Streamdeck and for this I want to make a service to increase and decrease the light level by 10.
The entity in question is: light.nicci_cosylight_light
In the developer tools section I can retrieve the value of the brightness using the following template
{{state_attr('light.nicci_cosylight_light', 'brightness') | float(0)}}
the result is: 10 as number type
the automation looks like the following
description: ""
trigger: []
condition:
- condition: device
type: is_on
device_id: 40e4847e34ce5368e8816fd86043d0be
entity_id: b4dc2f7cf9032fd17c296ee833ffb3f0
domain: light
action:
- type: turn_on
device_id: 40e4847e34ce5368e8816fd86043d0be
entity_id: b4dc2f7cf9032fd17c296ee833ffb3f0
brightness_pct: "{{state_attr('light.nicci_cosylight_light', 'brightness') + 10 | float(0)}}"
domain: light
mode: single
but I am getting the following error message
Message malformed: expected float for dictionary value @ data['brightness_pct']
I also tried to remove the "" within the brightness_pct but this also did not work.