Only show sliders for dimmable lamps

This commit is contained in:
Thomas Lovén 2018-08-17 15:19:35 +02:00
parent d96c3033b2
commit 11fc8d1b73

View File

@ -62,6 +62,12 @@ class SliderEntityRow extends Polymer.Element {
{
this.showTop = false;
this.showBottom = false;
if(!(this.attribute in this.stateObj.attributes)) {
if(!('supported_features' in this.stateObj.attributes) ||
!(this.stateObj.attributes['supported_features'] & 1)) {
return;
}
}
if(!(this.hideWhenOff && !this.isOn)) {
if(this.breakSlider)
this.showBottom = true;