Skip to content

Commit d1622f2

Browse files
committed
Check for available_climate_presets to detect ThermostatDevice
1 parent dec0e92 commit d1622f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/seam/thermostats/thermostat-device.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export interface ClimateSetting {
3636

3737
export const isThermostatDevice = (
3838
device: Device
39-
): device is ThermostatDevice => 'is_fan_running' in device.properties
39+
): device is ThermostatDevice =>
40+
'available_climate_presets' in device.properties
4041

4142
export type ThermostatClimatePreset =
4243
ThermostatDevice['properties']['available_climate_presets'][number]

0 commit comments

Comments
 (0)