File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import {
1111 getAutomationAndHeatingTypeName ,
1212 getCoolingTypeName ,
1313 getDeviceFamilyName ,
14- hasRoomTemperatureSensor ,
1514 MUTUALLY_EXCLUSIVE_MODES ,
1615 parseAlarmTimestamp ,
1716 parseAnalogSensors ,
@@ -170,14 +169,12 @@ export const getReadings = async (modbusClient: ModbusRTU): Promise<Readings> =>
170169 ...sensorReadings ,
171170 }
172171
173- // Room temperature average is always available, but its value is always zero unless one or more optional
174- // room temperature sensor are installed
175- if ( hasRoomTemperatureSensor ( sensorTypesResult ) ) {
176- result = await mutex . runExclusive ( async ( ) => tryReadHoldingRegisters ( modbusClient , 46 , 1 ) )
177- readings = {
178- ...readings ,
179- 'roomTemperatureAvg' : parseTemperature ( result . data [ 0 ] ) ,
180- }
172+ // Room temperature average (register 46). Contains average of analog sensors (types 8/9/10)
173+ // or dedicated room temperature sensor (e.g., RJ10). Zero if no sensor configured.
174+ result = await mutex . runExclusive ( async ( ) => tryReadHoldingRegisters ( modbusClient , 46 , 1 ) )
175+ readings = {
176+ ...readings ,
177+ 'roomTemperatureAvg' : parseTemperature ( result . data [ 0 ] ) ,
181178 }
182179
183180 // Sensors that only work reliably on MD automation devices
You can’t perform that action at this time.
0 commit comments