šŸ’” Lovelace: RGB light card

Hey!

Is there any way to hide the switch from the light card?
I setup to turn on/off with a tap on the card, so the switch is not needed.

Thanks! :slight_smile:

The light card doesn’t have a switch :man_shrugging:

However, if you see a switch on your entities card, adding the following may help:

type: entities
show_header_toggle: false # <= Add this line

If it doesn’t solve your problem, please post a screenshot so we can understand instead of guessing.

Hey! :slight_smile:
Thanks, but I want to hide this:

image

Thanks!

Strungling to re-enable what I have in shelly4hass integration until white channel was working…

After white channel was not supported under shelly4hass I migrated all shelly devices to native shelly integration.

So now I need some help.

Can somebody tell me how to re-enable some functions which are not working for me anymore…

So look in lovelace is like that:
image

The problem is that when I try to edit white channel I actually edit

So how to edit white channel under lovelace… also editing color brigtness under lovelace would be very good…

Current lovelace code:

entities:
  - entity: light.shelly_rgbw2_dnevna
  - entity: sensor.shelly_rgbw2_dnevna_current_consumption
  - entity: sensor.shelly_rgbw2_dnevna_total_consumption
    name: Skupaj poraba
  - entity: sensor.variable_obvestilo_rgbw2_moc_svetlobe
  - entity: light.shelly_rgbw2_dnevna
    full_row: true
    step: 1
    type: custom:slider-entity-row
  - entity: sensor.variable_obvestilo_rgbw2_white
  - entity: light.shelly_rgbw2_dnevna
    full_row: true
    step: 1
    type: custom:slider-entity-row
    data:
      transition: 5
      white: 255
    target:
      device_id: 58c1420262940b82068d14666947731d
  - colors:
      - brightness: 1
        effect: 0
        icon_color: '#c0c0c0'
        rgb_color:
          - 255
          - 255
          - 255
        transition: 1
      - brightness: 220
        effect: 0
        icon_color: '#990000'
        rgb_color:
          - 255
          - 0
          - 0
        transition: 1
      - brightness: 220
        effect: 0
        icon_color: '#009900'
        rgb_color:
          - 0
          - 255
          - 0
        transition: 1
      - brightness: 220
        effect: 0
        icon_color: '#999900'
        rgb_color:
          - 255
          - 255
          - 0
        transition: 1
      - brightness: 220
        effect: 0
        icon_color: '#009999'
        rgb_color:
          - 0
          - 255
          - 255
        transition: 1
      - brightness: 220
        effect: 2
        icon_color: center/120% url('/local/images/rainbow.png')
        transition: 1
      - brightness: 1
        effect: 0
        icon_color: center/95% url('/local/images/night_mode.png')
        transition: 1
    entity: light.shelly_rgbw2_dnevna
    justify: between
    type: custom:rgb-light-card
show_header_toggle: false
title: LED trak
type: entities

Options for controller:

Did you ever figure out how to do this?

This card is awesome, but it would be even cooler if I could call the color picker wheel/color temp slider from one of the ā€œcolorā€ buttons.

I’ve seen a few people ask about this but no actual answers.

For anyone want combine call service and static colors,
ā€œNote that you can mix lights and service calls in the same cardā€ here

image

type: entities
entities:
  - type: custom:rgb-light-card
    entity: light.id
    colors:
      - rgb_color:
          - 234
          - 136
          - 140
        brightness: 255
        transition: 1
        icon_color: '#10b2ec'
      - type: call-service
        service: script.turn_on
        service_data:
          entity_id: script.abc
        icon_color: '#90b2ec'
1 Like

I was trying to use this light card but it seems like my

hide_when_off: true

is not working:

    entities:
      - entity: light.e27_living_room
      - type: custom:rgb-light-card
        entity: light.e27_living_room
        hide_when_off: true
        justify: center
        colors:
          - rgb_color:
              - 234
              - 136
              - 140
            brightness: 255
            transition: 1
          - rgb_color:
              - 251
              - 180
              - 139
            brightness: 200
            transition: 1
          - rgb_color:
              - 136
              - 198
              - 237
            brightness: 150
            transition: 1

gives
grafik
while

hide_when_off: false

seems to work
grafik

@kingisch Can you please go to the templates section of the developer tools, and tell me what is the result of this template while your light is turned off ?

{{ states['light.e27_living_room'].state }} 

Thanks

sure, it is ā€œoffā€
Thank you!

Edit: I found the mistake. I accidentally added two different entities in the entity section :man_facepalming:
Sorry for that!

I’m very much enjoying your card. Thanks again for making it.

Any possibility of a future version supporting templates?

Hey!
Did you manage to find a way to do this? I’m trying to call 2 services - Stop_dynamic_scenes and Light.Turn_on.
However, i can’t seem to find a way to do that. I have gotten this far, but every combination i try to do to call different services with the same click, it just calls one of them and not the other one
Ideally, it would call the ā€œStop_dynamic_scenesā€ for all the buttons that i have in that row

type: custom:rgb-light-card
entity: light.office_floor
label_size: 11
size: 40
justify: center
colors:
  - type: call-service
    service: scene_presets.stop_dynamic_scenes_for_targets
    service_data:
      targets:
        entity_id: light.office_floor
    color_temp_kelvin: 6410
    brightness: 255
    icon_color: 'linear-gradient(15deg, #fffcf7, #cae9f3)'
    label: Energise

Can you put the two service calls in a script and then call that?

Hey!
I could, however, i have multiple colours set up in the UI. Having a script for each of them would clug up the system. Is there maybe a way to pass the service call data to the script, run the ā€œStop_dynamic_scenesā€, and then apply the service call for light_turn.on?

You don’t have to create a new script for each color, just create one script that accepts variables instead

Hello everyone !

I’m glad to announce that I just released the version 1.13.0 of this card, making it possible to integrate natively inside a Tile card :tada:

Also, clicking on colors on a mobile app will now trigger haptic feedback :vibration_mode:

2024-09-19_11-452024-09-19_11-44

Have a great day!

3 Likes

Hello. Thanks for the card, it’s awesome. I am facing a an issue, might be stupid but can’t figure it out. Everything works fine EXCEPT the color changing part. I can turn the lamp by clicking on each of my colors below but I can’t change color while the lamp is on. For example if lamp is on White and i click on red, nothing happens. However if I toggle it off and click on red, lamp turns on red color. Any chance to fix this? Here is my code:

type: entities
show_header_toggle: false
entities:
  - entity: light.bedside_lamp
    toggle: true
    type: custom:slider-entity-row
    hide_when_off: true
    hide_state: false
    show_icon: false
    colorize: false
  - type: custom:rgb-light-card
    entity: light.bedside_lamp
    hide_when_off: true
    colors:
      - rgb_color:
          - 255
          - 255
          - 255
        brightness: 255
        transition: 1
      - rgb_color:
          - 234
          - 136
          - 140
        brightness: 255
        transition: 1
      - rgb_color:
          - 251
          - 180
          - 139
        brightness: 255
        transition: 1
      - rgb_color:
          - 136
          - 198
          - 237
        brightness: 255
        transition: 1
      - rgb_color:
          - 140
          - 231
          - 185
        brightness: 255
        transition: 1
state_color: false

@Sporbillis does it work properly when you use the ā€œlight.turn_onā€ action from the developer tools?

@bokub thanks for replying!

I get this error when trying from developer tools. Please note that this is a Xiaomi Mi bedside lamp 2 (in case it helps). On my meross smart bulbs the above yaml works fine. Please help!

@Sporbillis This means it’s a Home Assistant error, that has nothing to do with my card.

Once you solve this problem, the card will work properly. Maybe create a dedicated topic to ask for help?

@bokub

Ok so after a restart the action works fine in developer tools. However my issue with the color changing in the card is not fixed. Anything else I can do?