bokub / rgb-light-card

💡 A Lovelace custom card for RGB lights
MIT License
412 stars 24 forks source link

Issue to go back to a RGB color when an effect is enabled #42

Closed slywalker01 closed 3 years ago

slywalker01 commented 3 years ago

Hi, First of all, sorry for my english, it's not my native language. I have a problem with the card. Maybe a configuration error, or a bug, I don't know. I have a light, with color / brightness presets configured in the card (ie: yellow 100%, yellow 75%, yellow 50% ...) and the last button is to launch a color loop effect. When I switch from RGB preset to another RGB preset, it works very well. When I switch from RGB preset to effect, it works very well too. But the other way (effect to RGB preset) doesn't do anything. Effect still continue to work. I have to switch off the light to disengage the effect.

Here is my configuration :

type: entities
show_header_toggle: false
entities:
  - entity: light.veilleuse_room1
  - type: 'custom:rgb-light-card'
    justify: around
    entity: light.veilleuse_room1
    colors:
      - rgb_color:
          - 205
          - 159
          - 6
        brightness_pct: 100
        label: 100%
        transition: 2
        icon_color: 'rgba(205, 159, 6, 1)'
      - rgb_color:
          - 205
          - 159
          - 6
        brightness_pct: 80
        label: 80%
        transition: 2
        icon_color: 'rgba(205, 159, 6, 0.8)'
      - rgb_color:
          - 205
          - 159
          - 6
        brightness_pct: 60
        label: 60%
        transition: 2
        icon_color: 'rgba(205, 159, 6, 0.6)'
      - rgb_color:
          - 205
          - 159
          - 6
        brightness_pct: 40
        label: 40%
        transition: 2
        icon_color: 'rgba(205, 159, 6, 0.4)'
      - rgb_color:
          - 205
          - 159
          - 6
        brightness_pct: 20
        label: 20%
        transition: 2
        icon_color: 'rgba(205, 159, 6, 0.2)'
      - effect: colorloop
        brightness_pct: 100
        label: Loop
        transition: 2
        icon_color: linear-gradient(75deg, #990000, #cccc00, #00ff00, #33ffff, #6666ff, #ff99ff)
bokub commented 3 years ago

Hi !

sorry for my english, it's not my native language

No problem, I'm french too !

I tried your configuration on my own setup which uses a Yeelight bulb, and I cannot reproduce your problem... So your problem might be with your lights !

If you click on your light, then choose an effect (red rectangle), then click on a color (red arrow), does the effect stop?

image

slywalker01 commented 3 years ago

I will be an gentleman and keep trying to write in english :-)

For the lights, I use Philips Hue Go and Philips Hue Iris. I can reproduce the problem with the 2 models.

I'm a beginner with Home Assistant (and RGB Light Card), how can I obtain the same window as you show up ? Can you provide me a configuration example ?

slywalker01 commented 3 years ago

And another strange thing :

bokub commented 3 years ago

Just click on the name of your veilleuse in your Lovelace UI!

image

bokub commented 3 years ago

when I specify colorloop, it seems there are only some shades of yellow

There is nothing I can do about it...

You need to understand that my rgb-light-card just sends commands to Home Assistant, and doesn't have any knowledge about lights !

I your example, the card just sends the following command to Home Assistant, and nothing more!

service: light.turn_on
service_data:
  entity_id: light.veilleuse_room1
  effect: colorloop
  brightness_pct: 100
  transition: 2 

You can go to the /developer-tools/service page of your home assistant to send the same command yourself

slywalker01 commented 3 years ago

I am ashamed :-/

So, I did what you ask :

To disengage the effect, I have to turn off the light.

slywalker01 commented 3 years ago

when I specify colorloop, it seems there are only some shades of yellow

There is nothing I can do about it...

You need to understand that my rgb-light-card just sends commands to Home Assistant, and doesn't have any knowledge about lights !

I your example, the card just sends the following command to Home Assistant, and nothing more!

service: light.turn_on
service_data:
  entity_id: light.veilleuse_room1
  effect: colorloop
  brightness_pct: 100
  transition: 2 

You can go to the /developer-tools/service page of your home assistant to send the same command

I understand this :-)

I just want to inform you, in case someone ask you later.

bokub commented 3 years ago

the colorloop still works, the chosen color is not displayed, it seems that nothing change

Then that's what I though, your problem is about your lights, not the card...

Maybe you can try posting your problem on https://community.home-assistant.io/ ! Don't forget to include the model of your light

Have a good day

slywalker01 commented 3 years ago

Thanks for your help, and by the way, excellent job with this card 👍