custom-cards / light-entity-row

Entity row for lights with sliders for adjusting different values based on features
55 stars 13 forks source link

Cant disable certain sliders/buttons #3

Open u8915055 opened 5 years ago

u8915055 commented 5 years ago

Hello, I really like this card, very slick! However im having problems using it. It loads, and i have it assigned a decora wifi light. I can control the light but i want to turn off unsupported features for this light, namely the color temperature buttons and the color temperature slider.

Here's my lovelace config for this section:

In this config, temp buttons are still being shown as well as the colorTemp slider. However the other options seem to work for turning them off and on (showColorPicker, showColorSliders).

I see in the code it says:

  if (!this._config.hideTempButtons && this.isSupported(SUPPORT_COLOR_TEMP)) {
    this.showTempButtons = true
  }

So its almost like somehow if the code detects the element supports color temp then show it anyway? Am i reading that right? But when i look at the element output i do not see any support for color temp, only brightness.

The decora wifi light element shows supported_features of 33

Thank you kindly for your efforts.

u8915055 commented 5 years ago

I think i figured it out.. from what i can tell by the code there are 5 options for show/hide Where i was getting thrown off is that some of them start with 'hide' and some start with 'show'.. I was assuming based on the examples that all of them start with 'show'.

Now that i specify them like below, they seem to work:

        hideBrightness: false
        hideColorTemp: true
        hideTempButtons: true
        showColorSliders: false
        showColorPicker: false

Bit confusing but have it working now.

Thanks again for your work on this.. love the card.

Andoramb commented 5 years ago

@u8915055 For me the "hideTempButtons: true" is not hiding the Color Temperature Buttons... It was working before, then they suddenly appeared again

Gamepsyched commented 5 years ago

Same here. However, hideColorTemp hides both