@@ -3,12 +3,11 @@ import { useEffect, useState } from 'react'
33import type { HvacModeSetting , ThermostatDevice } from 'seamapi'
44
55import { debounce } from 'lib/debounce.js'
6- import { BeeIcon } from 'lib/icons/Bee.js'
76import { CheckBlackIcon } from 'lib/icons/CheckBlack.js'
87import { ChevronWideIcon } from 'lib/icons/ChevronWide.js'
98import { NestedClimateSettingScheduleTable } from 'lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.js'
109import type { CommonProps } from 'lib/seam/components/common-props.js'
11- import { useConnectedAccount } from 'lib/seam/connected-accounts/use-connected-account .js'
10+ import { DeviceInfo } from 'lib/seam/components/DeviceDetails/DeviceInfo .js'
1211import { useClimateSettingSchedules } from 'lib/seam/thermostats/climate-setting-schedules/use-climate-setting-schedules.js'
1312import { useCoolThermostat } from 'lib/seam/thermostats/use-cool-thermostat.js'
1413import { useHeatCoolThermostat } from 'lib/seam/thermostats/use-heat-cool-thermostat.js'
@@ -50,8 +49,6 @@ export function ThermostatDeviceDetails({
5049} : ThermostatDeviceDetailsProps ) : JSX . Element | null {
5150 const [ climateSettingsOpen , setClimateSettingsOpen ] = useState ( false )
5251
53- const { connectedAccount } = useConnectedAccount ( device . connected_account_id )
54-
5552 const { climateSettingSchedules } = useClimateSettingSchedules ( {
5653 device_id : device . device_id ,
5754 } )
@@ -145,27 +142,13 @@ export function ThermostatDeviceDetails({
145142 < ManualOverrideRow device = { device } />
146143 </ DetailSection >
147144 ) }
148-
149- < DetailSection label = { t . deviceDetails } >
150- < DetailRow label = { t . manufacturer } >
151- < div className = 'seam-detail-row-hstack' >
152- { device . properties . model . manufacturer_display_name }
153- { device . properties . manufacturer === 'ecobee' && < BeeIcon /> }
154- </ div >
155- </ DetailRow >
156- { ! disableConnectedAccountInformation && (
157- < DetailRow
158- label = { t . linkedAccount }
159- sublabel = {
160- connectedAccount ?. user_identifier ?. email ??
161- device . connected_account_id
162- }
163- />
164- ) }
165- { ! disableResourceIds && (
166- < DetailRow label = { t . deviceId } sublabel = { device . device_id } />
167- ) }
168- </ DetailSection >
145+ < DeviceInfo
146+ device = { device }
147+ disableConnectedAccountInformation = {
148+ disableConnectedAccountInformation
149+ }
150+ disableResourceIds = { disableResourceIds }
151+ />
169152 </ DetailSectionGroup >
170153 </ div >
171154 </ div >
@@ -459,10 +442,6 @@ const t = {
459442 'When a scheduled climate reaches its end time, the default settings will kick in.' ,
460443 defaultClimate : 'Default climate' ,
461444 allowManualOverride : 'Allow manual override' ,
462- deviceDetails : 'Device details' ,
463- manufacturer : 'Manufacturer' ,
464- linkedAccount : 'Linked account' ,
465- deviceId : 'Device ID' ,
466445 none : 'None' ,
467446 fanModeSuccess : 'Successfully updated fan mode!' ,
468447 fanModeError : 'Error updating fan mode. Please try again.' ,
0 commit comments