#Picture Element Problem

1 messages · Page 1 of 1 (latest)

astral magnet
#

Hello, I am currently using picture elements. As I made a white light picture as well as a red light picture it appears green when I change the color to "white" on my lights. I am using following code. Is there something wrong with it? ```yaml

  • type: custom:config-template-card
    variables:
    LEUCHTENSTATUS: states['light.dresden_elektronik_conbee_ii_tischleuchte'].state
    FARBMODUS: >-
    states['light.dresden_elektronik_conbee_ii_tischleuchte'].attributes.color_mode
    LICHTFARBE: >-
    states['light.dresden_elektronik_conbee_ii_tischleuchte'].attributes.hs_color
    HELLIGKEIT: >-
    states['light.dresden_elektronik_conbee_ii_tischleuchte'].attributes.brightness
    entities:
    • light.dresden_elektronik_conbee_ii_tischleuchte
      element:
      type: image
      image: /local/Floor_Plan/1x1_transparent.png
      state_image:
      'on': >-
      ${FARBMODUS === 'color_temp' ?
      '/local/Floor_Plan/birth/Plan_2100_tisch.png' :
      '/local/Floor_Plan/birth/Plan_2100_tisch_rot.png' }
      entity: light.dresden_elektronik_conbee_ii_tischleuchte
      style:
      filter: '${ "hue-rotate(" + (LICHTFARBE ? LICHTFARBE[0] : 0) + "deg)"}'
      opacity: '${LEUCHTENSTATUS === ''on'' ? (HELLIGKEIT / 254) : ''100''}'
      mix-blend-mode: lighten
      pointer-events: none
      left: 45%
      top: 60%
      width: 100%

The color works great tho.
#

this one is if I turn the light to "white"

#

this one if I turn the light "blue"

short gazelle
#

I am having the same problem with the rotation being off for certain colors. A small bump to the number seems to better align it for some than others but I guess I need to look into what HS color returns.