From a1050f090662ef41f11dce033de86c0947e6d4c4 Mon Sep 17 00:00:00 2001 From: Liz Sugar Date: Wed, 27 Apr 2022 16:37:32 -0700 Subject: [PATCH] cleanup --- dist/slider-button-card.js | 17 ----------------- src/controllers/input-number-controller.ts | 19 ------------------- 2 files changed, 36 deletions(-) diff --git a/dist/slider-button-card.js b/dist/slider-button-card.js index 247d4f0..b680350 100644 --- a/dist/slider-button-card.js +++ b/dist/slider-button-card.js @@ -5735,13 +5735,10 @@ class InputNumberController extends Controller { super(...arguments); this._invert = false; } - // _min; - // _max; get _value() { return this.stateObj.state; } set _value(value) { - //value = percentageToValue(value, this._min, this._max); this._hass.callService('input_number', 'set_value', { // eslint-disable-next-line @typescript-eslint/camelcase entity_id: this.stateObj.entity_id, @@ -5754,20 +5751,6 @@ class InputNumberController extends Controller { get _max() { return this.stateObj.attributes.max; } - // get _targetValue(): number { - // return this._value; - // } - // set _targetValue(value: number) { - // if (value !== this.targetValue) { - // if (value > this._min) { - // value = this._min; - // } - // if (value > this._max) { - // value = this._max; - // } - // this._targetValue = value; - // } - // } get isValuePercentage() { return false; } diff --git a/src/controllers/input-number-controller.ts b/src/controllers/input-number-controller.ts index 910e019..47e902f 100644 --- a/src/controllers/input-number-controller.ts +++ b/src/controllers/input-number-controller.ts @@ -5,15 +5,12 @@ import { SliderConfig } from '../types'; export class InputNumberController extends Controller { _targetValue; _invert = false; - // _min; - // _max; get _value(): number { return this.stateObj.state; } set _value(value) { - //value = percentageToValue(value, this._min, this._max); this._hass.callService('input_number', 'set_value', { // eslint-disable-next-line @typescript-eslint/camelcase entity_id: this.stateObj.entity_id, @@ -29,22 +26,6 @@ export class InputNumberController extends Controller { return this.stateObj.attributes.max; } - // get _targetValue(): number { - // return this._value; - // } - - // set _targetValue(value: number) { - // if (value !== this.targetValue) { - // if (value > this._min) { - // value = this._min; - // } - // if (value > this._max) { - // value = this._max; - // } - // this._targetValue = value; - // } - // } - get isValuePercentage(): boolean { return false; }