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

template-light RGBW brightness does not work on scene call #134037

Open
Volvox0815 opened this issue Dec 26, 2024 · 1 comment
Open

template-light RGBW brightness does not work on scene call #134037

Volvox0815 opened this issue Dec 26, 2024 · 1 comment

Comments

@Volvox0815
Copy link

Volvox0815 commented Dec 26, 2024

The problem

I use a template-light to control my own rgbw device.
I can control it via the UI perfectly, but when using it in the scenes module colors rgbw and on/off states are triggered, brightness is not reacting/being sent from the scene module it seems. Or better: it is sent (I got the state changed event in nodered and checked the msg.data), but containing the actual value and not the one that is stored in the scene.

Imagine I have just manually adjusted the brightness via UI to 81% (->207). Then trigger the Scene where It should dimm to 255, I got this data trigger in Nodered:

Bildschirmfoto 2024-12-26 um 15 51 56

I can see also see no changes on the brightness field in the developer section (and of course also not in the linked input_number.daniel_kueche_rgbw_brightness):

Bildschirmfoto 2024-12-26 um 15 57 30

Attached the yaml config of the light fixture and the scene fixture.

Anything I am missing here? If using the template-light for a normal dimmable light without rgbw it is working without any issues and updates the brightness as it should when calling the scene

What version of Home Assistant Core has the issue?

core-2024.12.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

template-light, scenes

Link to integration documentation on our website

https://www.home-assistant.io/integrations/light.template/

Diagnostics information

No response

Example YAML snippet

///template-light config///

input_number:
  daniel_kueche_rgbw_brightness:
    name: Daniel Kueche RGBW Brightness
    initial: 100
    min: 0
    max: 255
    step: 1
  daniel_kueche_red:
    name: Daniel Kueche RGBW Red
    initial: 255
    min: 0
    max: 255
    step: 1
  daniel_kueche_green:
    name: Daniel Kueche RGBW Green
    initial: 255
    min: 0
    max: 255
    step: 1
  daniel_kueche_blue:
    name: Daniel Kueche RGBW Blue
    initial: 255
    min: 0
    max: 255
    step: 1
  daniel_kueche_white:
    name: Daniel Kueche RGBW White
    initial: 255
    min: 0
    max: 255
    step: 1

light:
  - platform: template
    lights:
      daniel_kueche_rgbw_light:
        unique_id: daniel_kueche_rgbw_light
        friendly_name: "Daniel Küche RGBW"
        level_template: "{{ states('input_number.daniel_kueche_rgbw_brightness') | int }}"
        rgbw_template: "({{ states('input_number.daniel_kueche_red') | int }},{{ states('input_number.daniel_kueche_green') | int }},{{ states('input_number.daniel_kueche_blue') | int }},{{ states('input_number.daniel_kueche_white') | int }})"
        turn_on:
          - action: input_number.set_value
            target:
              entity_id: input_number.daniel_kueche_rgbw_brightness
            data:
              value: "{{ brightness | default(states('input_number.daniel_kueche_rgbw_brightness') | int) }}"
        turn_off:
        set_level:
          - action: input_number.set_value
            target:
              entity_id: input_number.daniel_kueche_rgbw_brightness
            data:
              value: "{{ brightness }}"
        set_rgbw:
          - action: input_number.set_value
            target:
              entity_id: input_number.daniel_kueche_red
            data:
              value: "{{ r }}"
          - action: input_number.set_value
            target:
              entity_id: input_number.daniel_kueche_green
            data:
              value: "{{ g }}"
          - action: input_number.set_value
            target:
              entity_id: input_number.daniel_kueche_blue
            data:
              value: "{{ b }}"
          - action: input_number.set_value
            target:
              entity_id: input_number.daniel_kueche_white
            data:
              value: "{{ w }}"

//// scenes.yaml//

- id: '1734977590857'
  name: Appartment Wohnung Putzen
  entities:
    light.daniel_kueche_rgbw_light:
      supported_color_modes:
      - rgb
      - rgbw
      color_mode: rgbw
      brightness: 255
      hs_color:
      - 0
      - 0
      rgb_color:
      - 255
      - 255
      - 255
      xy_color:
      - 0.323
      - 0.329
      rgbw_color:
      - 0
      - 0
      - 0
      - 255
      friendly_name: Daniel Küche RGBW
      supported_features: 0
      state: 'on'

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @PhracturedBlue, @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (template) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of template can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign template Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


template documentation
template source
(message by IssueLinks)

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

No branches or pull requests

1 participant