From a7fdbc069b65e7c2cc8472ec9b7cb55e6e0aa984 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 30 Aug 2019 19:29:17 -0500 Subject: [PATCH] Update fan direction (#3547) * Handle current_direction in more-info-fan * remove current_direction changes * add forward/reverse to translations --- .../more-info/controls/more-info-fan.js | 20 +++++++++---------- src/translations/en.json | 4 +++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/dialogs/more-info/controls/more-info-fan.js b/src/dialogs/more-info/controls/more-info-fan.js index 4df080e319..8bd690ae5b 100644 --- a/src/dialogs/more-info/controls/more-info-fan.js +++ b/src/dialogs/more-info/controls/more-info-fan.js @@ -81,15 +81,15 @@ class MoreInfoFan extends LocalizeMixin(EventsMixin(PolymerElement)) {
[[localize('ui.card.fan.direction')]]
@@ -164,25 +164,25 @@ class MoreInfoFan extends LocalizeMixin(EventsMixin(PolymerElement)) { }); } - onDirectionLeft() { + onDirectionReverse() { this.hass.callService("fan", "set_direction", { entity_id: this.stateObj.entity_id, direction: "reverse", }); } - onDirectionRight() { + onDirectionForward() { this.hass.callService("fan", "set_direction", { entity_id: this.stateObj.entity_id, direction: "forward", }); } - computeIsRotatingLeft(stateObj) { + computeIsRotatingReverse(stateObj) { return stateObj.attributes.direction === "reverse"; } - computeIsRotatingRight(stateObj) { + computeIsRotatingForward(stateObj) { return stateObj.attributes.direction === "forward"; } } diff --git a/src/translations/en.json b/src/translations/en.json index 3bf8d23235..9047b48fc8 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -416,7 +416,9 @@ "fan": { "speed": "Speed", "oscillate": "Oscillate", - "direction": "Direction" + "direction": "Direction", + "forward": "Forward", + "reverse": "Reverse" }, "light": { "brightness": "Brightness",