Continuing the discussion from Template light: Can effect list be hardcoded?:
I have a Broadcom/BestCon which is ‘trained’ ot control some RF-tealights.
I’ve created a template-light that works for ON/OFF, but struggeling with a couple of “effects”
so the light on-off works, but changing the effect-drop-down gives me this error:
So why is it complaining about “light.turn_on”, when i try to call a different service?
Is it not possible to do what I’m trying to do??
(given that effects are part of light &stuff??)
# config from yaml-file in packages-folder,, could also be written in configuration.yaml
input_select:
kitchen_tealights_effects:
name: Kitchen Tealights effects
options:
- Candle
- Light
initial: Candle
light:
- platform: template
lights:
kitchen_tealights:
friendly_name: "Kitchen Tealights"
# level_template: "{{ state_attr('sensor.theater_brightness', 'lux')|int }}"
# value_template: "{{ state_attr('sensor.theater_brightness', 'lux')|int > 0 }}"
# temperature_template: "{{states('input_number.temperature_input') | int}}"
# color_template: "({{states('input_number.h_input') | int}}, {{states('input_number.s_input') | int}})"
# effect_list_template: "{{ state_attr('light.led_strip', 'effect_list') }}"
# effect_list_template: "{{ state_attr('light.kitchen_tealights', 'effect_list') }}"
effect_list_template: "{{ state_attr('input_select.kitchen_tealights_effects', 'options') }}"
effect_template: > # "{{ states('input_select.david_tv_backlight_effects') }}"
{% if is_state('input_select.kitchen_tealights_effects', 'Candle') %}
- b64:JgB4AAABHZEREhE3ERQQExEUEBMRFBATETcRExE3ETcRNhE3ETcQOBAUERMQNxEUERIRFBATERQQOBA4EBMRNxE3EDgQOBA3EQAE6wABHkkRAAvqAAEdShEAC+kAAR5JEQAL6QABHkkRAAvpAAEeSREAC+kAAR1KEQANBQ== # candle mode
{% else %}
- b64:JgCAAAABHZARFBA4EBMRFBATERMRFBESETcRExA4EDgQNxE3ETcRNxE3ERIRNxEUEBMRFBATERQQExE3ERMRNxE3ETcRNxA3EQAE7QABHUoRAAvqAAEeShAAC+sAAR5JEQAL6wABHkkQAAvqAAEfSREAC+kAAR5JEQAL6QABHkkQAA0F
{% endif %}
turn_on:
service: remote.send_command
target:
entity_id: remote.broadlink_kitchen
data:
# device: ledsavers_tealights2
command:
# - turn on
- b64:JgBwAAABHZAQFBE3ERMQFBESERQREhEUEDcQFBE3ETcRNxA3EDgQNxEUERIRFBATERQQExEUEBMRNxE3EDgQNxE3EDcRNxE3EQAE6wABHkkQAAvqAAEdSREAC+gAAR5KEQAL6AABHUkRAAvpAAEdShEADQU=
turn_off:
service: remote.send_command
target:
entity_id: remote.broadlink_kitchen
data:
# device: ledsavers_tealights2
command:
# - turn off
- b64:JgBgAAABHpARFBA2EhMSEhETEBQRExAUETcREhE3ETcRNxI2ETcSNhE3ERISExESERMSExESERQQExE3ETcRNxE3ETcQOBA3EQAE6wABH0kSAAvoAAEgSBIAC+gAAR9IEQANBQ==
set_effect:
- service: remote.send_command
target:
entity_id: remote.broadlink_kitchen
data:
command: "{{ effect }}"
if I go to dev-tools/services and try the ‘modes’ there (one of them at the time) - they work fine:
service: remote.send_command
target:
entity_id: remote.broadlink_kitchen
data:
command:
# Candle-mode:
- b64:JgB4AAABHZEREhE3ERQQExEUEBMRFBATETcRExE3ETcRNhE3ETcQOBAUERMQNxEUERIRFBATERQQOBA4EBMRNxE3EDgQOBA3EQAE6wABHkkRAAvqAAEdShEAC+kAAR5JEQAL6QABHkkRAAvpAAEeSREAC+kAAR1KEQANBQ== # candle mode
# Light Mode:
# - b64:JgCAAAABHZARFBA4EBMRFBATERMRFBESETcRExA4EDgQNxE3ETcRNxE3ERIRNxEUEBMRFBATERQQExE3ERMRNxE3ETcRNxA3EQAE7QABHUoRAAvqAAEeShAAC+sAAR5JEQAL6wABHkkQAAvqAAEfSREAC+kAAR5JEQAL6QABHkkQAA0F