Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Effects in Template Light entity #79

Open
new-kirte opened this issue Dec 12, 2021 · 0 comments
Open

Using Effects in Template Light entity #79

new-kirte opened this issue Dec 12, 2021 · 0 comments

Comments

@new-kirte
Copy link

Hi,
The following template light works with the standard colour wheel:

  - platform: template
    lights:
      local_tuya_fairy_lights:
        unique_id: template_light.local_tuya_fairy_lights
        friendly_name: "Local Tuya Fairy Lights"
        value_template: "{{is_state('light.smart_fairy_lights','on')}}"
        effect_list_template: "{{ state_attr('input_select.fairy_lights_effects', 'options') }}"
        effect_template: "{{ states('input_select.fairy_lights_effects') }}"
        color_template: "{{state_attr('light.smart_fairy_lights', 'hs_color')}}"
        level_template: "{{state_attr('light.smart_fairy_lights', 'brightness')}}"
        turn_on:
          service: light.turn_on
          target:
            entity_id:
              - light.smart_fairy_lights
        turn_off:
          service: light.turn_off
          target:
            entity_id:
              - light.smart_fairy_lights
        **set_effect:
          - service: script.local_tuya_fairy_lights_change_scene_v10
            data_template:
              effect: '{{effect}}'**
        set_color:
          - service: light.turn_on
            data_template:
              hs_color: "({{h}}, {{s}})"
              entity_id:
                 - light.smart_fairy_lights
        set_level:
          - service: light.turn_on
            data_template:
              brightness: "{{brightness}}"
              entity_id:
                 - light.smart_fairy_lights

However, when using this custom card {{effect}} parameter is empty, so changing effects is not possible. Would it be possible to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant