On the Developer tools Service page it says, when I select ‘light.toggle’, that all ‘light.turn_on’ parameters can be used.
I can’t seem to get them to work. I can see a thread suggesting that the issue was reported two years ago, did it get resolved.?
Do I need to use the suggested, back in 2017, workaround or is the documentation correct and I have a problem?
1 Like
I have the same issue. light.toggle does not seem to work with all parameters.
brightness_pct does NOT work
brightness does work
effect does NOT work
color_temp does work
These are just the ones I have tested so far.
I wrote a script I use to toggle my lights back to white and bright when they come on. Is this any help?
# The example below toggles the light (group/room/light) on and off but always ensures the light is reset to bright and white
#
# action:
# service: script.light_toggle
# data:
# entity: light.lounge
#
#
light_toggle:
alias: toggle light to white
sequence:
- service_template: >
script.light_toggle_{{ 'on' if is_state(entity, 'off') else 'off' }}
data_template:
entity: '{{ entity }}'
light_toggle_on:
alias: light_on
sequence:
- service: light.turn_on
data_template:
entity_id: '{{ entity }}'
color_name: white
brightness: 255
light_toggle_off:
alias: light_off
sequence:
- service: light.turn_off
data_template:
entity_id: '{{ entity }}'
After all that effort - they fixed the issue in the latest release 0.101.0 !!
Ian