- Platform information:
- Hardware: amd64 / 4 cores / 8G RAM
- OS: Manjaro
- Java Runtime Environment: Oracle 11.0.18
- openHAB version: 3.4.2
- Issue of the topic:
Hello,
As I’m continuing to experiment with zigbee2mqtt, I have created a thing with four channels for a door sensor that I have here and that publishes contact, tamper, battery low, battery percent and battery voltage.
Here is the definition made in PaperUI:
UID: mqtt:topic:6b3d5af049:91070e9004
label: Contact porte entrée (zigbee2mqtt)
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:6b3d5af049
channels:
- id: ContactJSON
channelTypeUID: mqtt:contact
label: Contact
description: null
configuration:
stateTopic: zigbee2mqtt/Contact porte entrée
transformationPattern: JSONPATH:$.contact
off: "true"
on: "false"
- id: Tamper
channelTypeUID: mqtt:contact
label: Tamper
description: null
configuration:
stateTopic: zigbee2mqtt/Contact porte entrée
transformationPattern: JSONPATH:$.tamper
off: "true"
on: "false"
- id: BatteryLow
channelTypeUID: mqtt:contact
label: Battery Low
description: null
configuration:
stateTopic: zigbee2mqtt/Contact porte entrée
transformationPattern: JSONPATH:$.battery_low
off: "true"
on: "false"
- id: battery_level
channelTypeUID: mqtt:number
label: Battery level
description: null
configuration:
min: 0
stateTopic: zigbee2mqtt/Contact porte entrée
transformationPattern: JSONPATH:$.battery
max: 100
- id: battery_voltage
channelTypeUID: mqtt:number
label: Battery voltage
description: null
configuration:
stateTopic: zigbee2mqtt/Contact porte entrée
transformationPattern: JSONPATH:$.voltage
While this works, the various channels do not have automatic icons as there is with other non mqtt things. For instance, I have this:
While my mqtt thing channels show up like this:
Is there a way to add some “semantic” meaning to those channels so that they are recognized for what they are?
I have tried changing the channelTypeUID
by adding :ElectricPotential
after Number
but could only get the channel to be destroyed by doing so.
Is this at all possible?