Skip to content

Commit

Permalink
Update fan controller to new standard. Fix #200
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Oct 30, 2021
1 parent cb4a170 commit c714b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/fan-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export class FanController extends Controller {
get string() {
if (this.stateObj.state === "off")
return this._hass.localize("component.fan.state._.off");
return this.stateObj.attributes.speed;
return `${this.stateObj.attributes.percentage} %`;
}

get hasSlider() {
if ("speed" in this.stateObj.attributes) return true;
if ("percentage" in this.stateObj.attributes) return true;
return false;
}

Expand Down

0 comments on commit c714b1e

Please sign in to comment.