I have a few Xiaomi temp/humidity sensors set up using the following device handler, i would like the default reading on the tile to be temperature rather than humidity as shown in the tile image.
Could anyone help and advise which line i should change in device handler to do this, if it is possible?
I, and I think others, have tried modifying a bunch of different lines with no effect (Iād be happy to be proven wrong!). That said, if you switch DTHs from āXiaomi Aquara Temperature Humidity Sensorā to āXiaomi Temperature Humidity Sensorā (which was originally written for the pre-Aquara version and is also available at the bspranger Github) - it prioritizes the temperature in the new Smartthings app. No idea why.
Like @AlecM stated, lots of attempts have been made to do that with the new app. You could play with different VID: and ocfDeviceType: values within description(ā¦) to see what changes happen. Itās within the metadata section.
Hereās a work-in-progress tool that may, or may not, be helpful for VIDās:
At his point with the new app, developers donāt have a lot of documentation yet, but it is getting better.
@siddys - yes, thatās the one. I just tested this with another sensor that was on the Xiaomi Aquara Temperature Humidity Sensor and switched it over. It made the change. Note that I did have to close out of the new app on my iPhone and restart it (so it goes through the whole checking status thing on all devices). At first it still showed humidity on the device list - I went into the deviceās page and out and then the temp was showing on the list. Itās not as immediate as on the Classic app.
[Edit - @siddys - never mind. Apparently making the switch as I recommended previously to the non-Aqara temp/humidity sensor now breaks humidity reporting in the new app. @Neudyās suggestion on using the SmartSense Temp/Humidity sensor seems to be your best bet for the new app (it works for me). Sorry - the switch used to work just fine!]
Iāve tried the above but still canāt get it to budge in the new app⦠still saying humidity on the tile. However the classic app shows the temp on the tile.
Is this a software update fault or a user fault by me.
If we are still talking about the Aqara sensor, I have a reworked version of the ābsprangerā handler that favours temperature in the new app, though it also strips some other bits out (last update, battery change date, date format and stuff like that).
Thanks a lot @orangebucket for your work! looks well written and solved the issue natively finally!
A quick question, I just updated the device handler, and it seems to be working fine except for the pressure. I read your explanation in github, but Iām not sure if itās still a work in progress. I can see the readings in the history tab but not in the tile.
Happy to contribute with a pull request if needed but Iām new to device handlers coding
@orangebucket, I think Iād asked awhile back, and I tried to do it at one point myself but wasnāt having any luck (and havenāt been able to get back to it), but could you create a DTH like yourās but where HUMIDITY is the main value? (I have one of the sensors in my humidor)