diff --git a/futurehome/CHANGELOG.md b/futurehome/CHANGELOG.md index 5d3404e..71b97c4 100644 --- a/futurehome/CHANGELOG.md +++ b/futurehome/CHANGELOG.md @@ -5,6 +5,7 @@ - Added logo. - Added support for pairing new devices. - Added support for unpairing devices. +- Fixed using the unit reported by the numerical sensor. ## 0.1.7 (26.07.2025) diff --git a/futurehome/src/services/_sensor_numeric.ts b/futurehome/src/services/_sensor_numeric.ts index 73c0922..da35121 100644 --- a/futurehome/src/services/_sensor_numeric.ts +++ b/futurehome/src/services/_sensor_numeric.ts @@ -74,7 +74,7 @@ export function _sensor_numeric__components( const device_class = data[0]; const name = data[1]; - let unit = data[2]; + let unit = svc.props?.sup_units?.[0] ?? data[2]; if (unit === 'C') unit = '°C'; if (unit === 'F') unit = '°F'; if (unit === 'kph') unit = 'km/h';