Xiaomi Door Sensor setup?

Any guides on how to setup the door sensor? Probably really simple but doesn’t seem to get past the call service ‘dismiss’ button on homeassistant.

No issues with the gateway. Have put into LAN mode. No idea what the chinese voice prompt on the gateway is saying but again having no luck getting the new sensor recognised.

PS is there an English voice can be activated to the gateway? Running MI app on android if it makes any difference.

I don’t think it is possible to change the voice on the gateway. Does the sensor appear properly in Mi Home app?

Easiest way is to double-check your key is fine and properly entered in configuration and activate discovery, in case it is not active already.

For such a sensor, you should find a binary sensor named like:
binary_sensor.door_window_sensor_xxxxxxxxxxxxxxx

you have to use the tool (little pin thing to get the sensor to be recognized by the app first (it will appear inside the app when it’s been configured correctly) but you need to select it in the app as a new sensor and allocate a name/room etc once the voice says it’s been seen (it’s in Chinese but it’s obvious when it works). You add it via the gateway, so select the gateway then devices then select your device from the list (you have the app registered in china for all of them to appear), then select it and it will give a time to press the pin in the hole to activate it. From there it will be added to HA as a binary_sensor, look for it in the states menu. Hope that helps :slight_smile:

Thanks all. Couldn’t get it to show at all on 0.57 but when I updated to 0.57.3 it appeared. Nifty little things

ok sorry another basic question that might be a breeze to most but i’m having no luck getting automations to work because of formatting most likely

anybody care to see what I should add for the open part. Ideally i’d like the light to go on for a few mins, then go off. Was considering close for light to go off but probably not needed if it can revert to off state.

https://pastebin.com/hupwxdt8

The door_window sensors use ‘on’/‘off’ (note the single quotes) not “open”/“closed” same for the motion sensors :slight_smile:

Normally the automation would look like similar to this…

 - alias: 'Turn on hall light when there is movement'
   initial_state: 'on'
   trigger:
     - platform: state
       entity_id: binary_sensor.motion_sensor_158d000125a67b
       to: 'on'
   action:
     - service: light.turn_on
       entity_id: light.bathroom_light

Ahhh. Was just reading what was on the front end I thought was the identifiers. Mucho gracias. Will give that a go