diff --git a/.storybook/seed-fake.js b/.storybook/seed-fake.js index 9cba1b6ea..57337984c 100644 --- a/.storybook/seed-fake.js +++ b/.storybook/seed-fake.js @@ -396,6 +396,7 @@ export const seedFake = (db) => { heating_set_point_celsius: 18.3, }, available_hvac_mode_settings: ['off', 'cool', 'heat', 'heat_cool'], + available_fan_mode_settings: ['auto', 'on', 'circulate'], can_enable_automatic_cooling: true, can_enable_automatic_heating: true, min_heating_cooling_delta_fahrenheit: 5, @@ -474,6 +475,8 @@ export const seedFake = (db) => { heating_set_point_fahrenheit: 68, }, available_hvac_mode_settings: ['off', 'cool', 'heat', 'heat_cool'], + available_fan_mode_settings: ['auto', 'on'], + available_climate_presets: [], can_enable_automatic_cooling: true, can_enable_automatic_heating: true, max_cooling_set_point_celsius: 33.333333333333336, diff --git a/src/lib/seam/thermostats/thermostat-device.ts b/src/lib/seam/thermostats/thermostat-device.ts index 28c77502f..e1203aed8 100644 --- a/src/lib/seam/thermostats/thermostat-device.ts +++ b/src/lib/seam/thermostats/thermostat-device.ts @@ -36,7 +36,8 @@ export interface ClimateSetting { export const isThermostatDevice = ( device: Device -): device is ThermostatDevice => 'is_fan_running' in device.properties +): device is ThermostatDevice => + 'available_climate_presets' in device.properties export type ThermostatClimatePreset = ThermostatDevice['properties']['available_climate_presets'][number]