Fix fan rotation attributes (#1159)

pull/1193/head
cdce8p 2018-05-18 17:14:59 +02:00 committed by Paulus Schoutsen
parent 20ea9e5df7
commit ba3670c5db
1 changed files with 4 additions and 4 deletions

View File

@ -147,23 +147,23 @@ class MoreInfoFan extends EventsMixin(PolymerElement) {
onDirectionLeft() { onDirectionLeft() {
this.hass.callService('fan', 'set_direction', { this.hass.callService('fan', 'set_direction', {
entity_id: this.stateObj.entity_id, entity_id: this.stateObj.entity_id,
direction: 'left' direction: 'reverse'
}); });
} }
onDirectionRight() { onDirectionRight() {
this.hass.callService('fan', 'set_direction', { this.hass.callService('fan', 'set_direction', {
entity_id: this.stateObj.entity_id, entity_id: this.stateObj.entity_id,
direction: 'right' direction: 'forward'
}); });
} }
computeIsRotatingLeft(stateObj) { computeIsRotatingLeft(stateObj) {
return stateObj.attributes.direction === 'left'; return stateObj.attributes.direction === 'reverse';
} }
computeIsRotatingRight(stateObj) { computeIsRotatingRight(stateObj) {
return stateObj.attributes.direction === 'right'; return stateObj.attributes.direction === 'forward';
} }
} }