Skip to content

Commit

Permalink
matt8707#449: Support decimal precision to thermostat temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
semyonchetvertnyh committed Nov 15, 2024
1 parent 25c374d commit e2358e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/Components/WheelPicker.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
const minTemp = stateObj?.attributes?.min_temp;
const maxTemp = stateObj?.attributes?.max_temp;
const targetTempStep = stateObj?.attributes?.target_temp_step || 1;
if (minTemp && maxTemp) {
for (let i = maxTemp; i >= minTemp; i--) {
if (targetTempStep < 1) {
temperatures.push(i + targetTempStep);
}
temperatures.push(i);
}
}
Expand Down Expand Up @@ -224,7 +228,7 @@

<style>
:root {
--width: 7.2rem;
--width: 8.9rem;
--height: 4.9rem;
}
Expand Down

0 comments on commit e2358e3

Please sign in to comment.