bokub / rgb-light-card

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

color_temp not working for me #75

Closed Raeprice closed 1 year ago

Raeprice commented 1 year ago

Hi, i have been using the rgb_color which seems to be working just fine, however ive tried to add color_temp to my YAML using Mireds value and getting the error: Failed to call service light/turn_on. expected int for dictionary value @ data['color_temp']

My YAML is as below, can anyone advise please?

type: entities
entities:
  - type: section
    label: Parents Room Light
  - type: custom:slider-entity-row
    entity: >-
      light.parentbedroomlight_zha_group_0x0002
    toggle: true
    full_row: false
    name: Light
  - type: custom:rgb-light-card
    entity: >-
      light.parentbedroomlight_zha_group_0x0002
    size: 28
    colors:
      - rgb_color:
          - 255
          - 0
          - 0
        transition: 1
      - rgb_color:
          - 255
          - 127
          - 0
        transition: 1
      - rgb_color:
          - 255
          - 255
          - 0
        transition: 1
      - rgb_color:
          - 0
          - 255
          - 0
        transition: 1
      - rgb_color:
          - 0
          - 0
          - 255
        transition: 1
      - rgb_color:
          - 75
          - 0
          - 130
        transition: 1
      - rgb_color:
          - 148
          - 0
          - 211
        transition: 1
  - type: custom:rgb-light-card
    entity: >-
      light.parentbedroomlight_zha_group_0x0002
    size: 28
    colors:
      - color_temp:
          - 1
      - color_temp:
          - 200
      - color_temp:
          - 300
      - color_temp:
          - 500
state_color: true
show_header_toggle: false
title: Parents Bedroom Light
bokub commented 1 year ago

Hello, color_temp is supposed to be an integer, not an array.

You should write this for example: - color_temp: 500

Raeprice commented 1 year ago

Perfect thank you, thats now working.