I’m using OpenHAB3 and successfully integrated this Bluetooth Thermometer:
i am trying to integrate a XIAOMI Mijia Bluetooth Thermometer 2 device into my openhab 2 (runing on a RPI 3b+). I only have the sensors, no Xiaomi gateway.
I tried to use the bluetooth binding, however it is not detecting any device at all.
Using sudo bluetoothctl via SSH i can find and conncet the device to the RPI 3b+:
Can someone tell me how to connect the device to openhab 2?
I tried to search it on google and also hear but didnt find a valid info.
Temperature works fine, I also get the data for humidity but it s looks like
0.4200000 % instead of 42%
I guess it’s just a simple thing to change here:
… but I was not able to find the solution. Can anyone please help?
That is the number you are getting on mqtt and you are using a number item. You could cheat and use a dimmer item or in a rule multiply by 100
You can try to add state description in Item properties:
Works for me in some cases…
You’ve probably linked the MQTT number channel to a
Number:Dimensionless type Item. When no unit is given, that thinks it’s a ratio. 42% = 0.42-to-1 ratio.
Be sure you’ve given your unit (%) in the MQTT channel parameters.
Thanks a lot guys fot that fast and good answers!
I did as
@denominator mentioned and just used an dimmer item - thanks! <3 for every one of you