Skip to content

Commit f8060c7

Browse files
authored
fix: Hide default climate settings with disableClimateSettingSchedules (#602)
1 parent cb1ea3d commit f8060c7

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

src/lib/seam/components/DeviceDetails/ThermostatDeviceDetails.tsx

+18-16
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,25 @@ export function ThermostatDeviceDetails({
123123
<FanModeRow device={device} />
124124
</DetailSection>
125125

126-
<DetailSection
127-
label={t.defaultSettings}
128-
tooltipContent={t.defaultSettingsTooltip}
129-
>
130-
<DetailRow label={t.defaultClimate}>
131-
{device.properties.default_climate_setting != null ? (
132-
<ClimateSettingStatus
133-
climateSetting={device.properties.default_climate_setting}
134-
temperatureUnit='fahrenheit'
135-
/>
136-
) : (
137-
<p>{t.none}</p>
138-
)}
139-
</DetailRow>
126+
{!disableClimateSettingSchedules && (
127+
<DetailSection
128+
label={t.defaultSettings}
129+
tooltipContent={t.defaultSettingsTooltip}
130+
>
131+
<DetailRow label={t.defaultClimate}>
132+
{device.properties.default_climate_setting != null ? (
133+
<ClimateSettingStatus
134+
climateSetting={device.properties.default_climate_setting}
135+
temperatureUnit='fahrenheit'
136+
/>
137+
) : (
138+
<p>{t.none}</p>
139+
)}
140+
</DetailRow>
140141

141-
<ManualOverrideRow device={device} />
142-
</DetailSection>
142+
<ManualOverrideRow device={device} />
143+
</DetailSection>
144+
)}
143145

144146
<DetailSection label={t.deviceDetails}>
145147
<DetailRow label={t.manufacturer}>

0 commit comments

Comments
 (0)