Skip to content

Commit

Permalink
Add sane defaults for temperature sliders (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewjeska authored Oct 26, 2023
1 parent 826e364 commit ea548fb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/lib/ui/thermostat/TemperatureControlGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export interface TemperatureControlGroupProps {
onHeatValueChange: (temperature: number) => void
coolValue: number
onCoolValueChange: (temperature: number) => void
delta: number
minHeat: number
maxHeat: number
minCool: number
maxCool: number
delta?: number
minHeat?: number
maxHeat?: number
minCool?: number
maxCool?: number
}

export function TemperatureControlGroup({
Expand All @@ -29,11 +29,11 @@ export function TemperatureControlGroup({
onHeatValueChange,
coolValue,
onCoolValueChange,
delta,
minHeat,
maxHeat,
minCool,
maxCool,
delta = 5,
minHeat = 60,
maxHeat = 90,
minCool = 60,
maxCool = 90,
}: TemperatureControlGroupProps): JSX.Element {
const showHeat = mode === 'heat' || mode === 'heat_cool'
const showCool = mode === 'cool' || mode === 'heat_cool'
Expand Down

0 comments on commit ea548fb

Please sign in to comment.