Remove turn_off from brightness slider (#1715)

This commit is contained in:
Anders Melchiorsen 2018-10-01 10:56:08 +02:00 committed by Paulus Schoutsen
parent f11ca53282
commit 8be5561d19

View File

@ -93,7 +93,7 @@ class MoreInfoLight extends LocalizeMixin(EventsMixin(PolymerElement)) {
<div class$="[[computeClassNames(stateObj)]]">
<div class="control brightness">
<ha-labeled-slider caption="[[localize('ui.card.light.brightness')]]" icon="hass:brightness-5" max="255" value="{{brightnessSliderValue}}" on-change="brightnessSliderChanged"></ha-labeled-slider>
<ha-labeled-slider caption="[[localize('ui.card.light.brightness')]]" icon="hass:brightness-5" min="1" max="255" value="{{brightnessSliderValue}}" on-change="brightnessSliderChanged"></ha-labeled-slider>
</div>
<div class="control color_temp">
@ -221,16 +221,10 @@ class MoreInfoLight extends LocalizeMixin(EventsMixin(PolymerElement)) {
if (isNaN(bri)) return;
if (bri === 0) {
this.hass.callService('light', 'turn_off', {
entity_id: this.stateObj.entity_id,
});
} else {
this.hass.callService('light', 'turn_on', {
entity_id: this.stateObj.entity_id,
brightness: bri,
});
}
this.hass.callService('light', 'turn_on', {
entity_id: this.stateObj.entity_id,
brightness: bri,
});
}
ctSliderChanged(ev) {