Skip to content

Commit 544fc20

Browse files
committed
Fix typo in sensor
Make the AC speed setting always uppercase
1 parent 52d2172 commit 544fc20

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

include/scripts.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ script:
181181
# always show "OFF", regardless of the last known fan_mode value.
182182
# Otherwise, show the current fan_mode.
183183
text: !lambda |-
184-
if (id(ac_fan_mode).state == "off") {
185-
return "OFF";
186-
}
187-
return id(ac_fan_mode).state;
188-
184+
std::string result = (id(ac_hvac_mode).state == "off")
185+
? "off"
186+
: id(ac_fan_mode).state;
187+
std::transform(result.begin(), result.end(), result.begin(), ::toupper);
188+
return result;

0 commit comments

Comments
 (0)