Fix fan rotation attributes (#1159)
parent
20ea9e5df7
commit
ba3670c5db
|
@ -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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue