mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-18 09:38:54 +00:00
Fix Home Assistant unit of measurement error for voc ppb sensors. https://github.com/Koenkk/zigbee2mqtt/issues/16057
This commit is contained in:
@@ -764,6 +764,12 @@ export default class HomeAssistant extends Extension {
|
||||
delete discoveryEntry.discovery_payload.device_class;
|
||||
}
|
||||
|
||||
// Home Assisstant only supports µg/m³, not other units like ppb.
|
||||
// https://github.com/Koenkk/zigbee2mqtt/issues/16057
|
||||
if (firstExpose.name === 'voc' && discoveryEntry.discovery_payload.unit_of_measurement !== 'µg/m³') {
|
||||
delete discoveryEntry.discovery_payload.device_class;
|
||||
}
|
||||
|
||||
discoveryEntries.push(discoveryEntry);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user