Xiaomi Door Contact

Hi all.

I cant get the status of my door sensor from Xiaomi in the BasicUI.

My items file looks like this:

Contact Wohnungstuer_Status <door>  { channel="mihome:sensor_magnet:158d00014d6234:isOpen" }

My sitemap file looks like this

    Text item=Wohnungstuer_Status

In the PaperUI the Status is being recognised overview

Try changing it in the sitemap file, from Text to Switch or Default?

Thank you for your reply but that did not work :-/

edit: @wars I saw you got this thing to work. Could you help me?

You need to add a stateformat, either in your items file or your sitemap file:



Like @sihui says, I always try to add it to the items file, should looks like this:

Contact Wohnungstuer_Status "status of door [%s] { channel=“mihome:sensor_magnet:158d00014d6234:isOpen” }

Thank you guys, but its still not working in BasicUI.

items file:

Contact Wohnungstuer_Status “Wohnungstuer [%s]”  { channel="mihome:sensor_magnet:158d00014d6234:isOpen" }

and sitemap

    Text item=Wohnungstuer_Status label="Wohnungstuer [%s]"

by the way. in habpanel it does work!


I never tried to add a stateformat to BOTH definitions … just try that for the sitemap entry and then restart openHAB to be sure :rofl:

Awesome. I did that and now its working. I tried that before but without a restart

1 Like