mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-28 23:00:55 +00:00
Improve Home Assistant history view for sensors without unit. #14103
This commit is contained in:
@@ -731,7 +731,7 @@ export default class HomeAssistant extends Extension {
|
||||
discovery_payload: {
|
||||
value_template: `{{ value_json.${firstExpose.property} }}`,
|
||||
enabled_by_default: !allowsSet,
|
||||
...(firstExpose.unit && {unit_of_measurement: firstExpose.unit}),
|
||||
unit_of_measurement: firstExpose.unit || '',
|
||||
...lookup[firstExpose.name],
|
||||
...extraAttrs,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user