Skip to content

Commit

Permalink
Fix Low speed button using custom setpoints.
Browse files Browse the repository at this point in the history
  • Loading branch information
finity69x2 authored Mar 23, 2021
1 parent 3c87d29 commit fee8733
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/fan-percent-button-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class CustomFanPercentRow extends Polymer.Element {
hiSetpoint = parseInt(HiSetpoint);
}
if (stateObj && stateObj.attributes) {
if (stateObj.state == 'on' && stateObj.attributes.percentage >= ((lowSetpoint + offSetpoint)/2) && stateObj.attributes.brightness <= ((medSetpoint + lowSetpoint)/2) ) {
if (stateObj.state == 'on' && stateObj.attributes.percentage > offSetpoint && stateObj.attributes.percentage <= ((medSetpoint + lowSetpoint)/2) ) {
low = 'on';
} else if (stateObj.state == 'on' && stateObj.attributes.percentage > ((medSetpoint + lowSetpoint)/2) && stateObj.attributes.percentage <= ((hiSetpoint + medSetpoint)/2) ) {
med = 'on';
Expand Down

0 comments on commit fee8733

Please sign in to comment.