Provide unit hint for system channel type atmospheric-humidity (#4170)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen
2024-04-07 10:53:47 +02:00
committed by GitHub
parent 619762a297
commit 258b0991d8
@@ -340,7 +340,7 @@ public class DefaultSystemChannelTypeProvider implements ChannelTypeProvider {
*/
public static final ChannelType SYSTEM_ATMOSPHERIC_HUMIDITY = ChannelTypeBuilder
.state(SYSTEM_CHANNEL_TYPE_UID_ATMOSPHERIC_HUMIDITY, "Atmospheric Humidity", "Number:Dimensionless")
.withDescription("Current atmospheric relative humidity").withCategory("Humidity")
.withUnitHint("%").withDescription("Current atmospheric relative humidity").withCategory("Humidity")
.withStateDescriptionFragment(
StateDescriptionFragmentBuilder.create().withReadOnly(true).withPattern("%.0f %%").build())
.withTags(List.of("Measurement", "Humidity")).build();