Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lizsugar committed Apr 27, 2022
1 parent 3a6f885 commit a1050f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 36 deletions.
17 changes: 0 additions & 17 deletions dist/slider-button-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}
Expand Down
19 changes: 0 additions & 19 deletions src/controllers/input-number-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
}
Expand Down

0 comments on commit a1050f0

Please sign in to comment.