How to use the latest mijia devices in Home Assistant?

How to use the latest mijia devices in Home Assistant?

wifi

switch:
  - platform: xiaomi_miio
    host: ip of the equipment
    token: your equipment token

mijia smart plug(wifi) - miio

switch:
  - platform: xiaomi_miio
    host: ip of the equipment
    token: your equipment token

wifi, do not confuse with the gateway, that’s working fine

switch:
  - platform: xiaomi_miio
    token: xxxxxxxxxxx
    host: 192.168.1.109
    name: Plug Office