Xiaomi Gateway Integration

If you are running in Docker, make sure you use network=host mode

1 Like

a nice beast. How does it work?

I have a netgear r7000, which is ok, but I think has problems with so many IOT using WiFi. You think the AC88 is better for IOT?

I have a problem with the display of the tempeture. Sometimes there are so many numbers :slight_smile: See picture.

Is it posible to at round(x) to the tempeture and sensors on a easy way?
Or must i make for all the sensors a template sensor?

1 Like

Having the same issue. It doesn’t happen at all times and only happens for some of the sensors, not all.

I use template sensors for temperature and humidity

temperature_kitchen:
  entity_id: sensor.temperature_158d0001100xxx
  friendly_name: Kitchen Temp
  value_template: '{{ states.sensor.temperature_158d0001100xxx.state | round(1) }}'
  icon_template: mdi:thermometer
  unit_of_measurement: "°C"
humidity_kitchen:
  entity_id: sensor.humidity_158d0001100xxx
  friendly_name: Kitchen Humidity
  value_template: '{{ states.sensor.humidity_158d0001100xxx.state | round(1) }}'
  icon_template: mdi:water
  unit_of_measurement: "%H"
1 Like

Hi @daanje,

Thank you so so much, I did not tick “Use the same network as Docker Host” under Network. And it is listed in the instruction!!
Wish I saw your post earlier, so I could save a few bucks:(:joy:. Just bought a raspberry pi and a few accessories.

1 Like

Which component / fork do you use? The official component does round all measurements to 2 digits after the decimal point

@Syssi, sorry, i don’t realy understand what you mean.
Maybe this?: I use the tempeture sensor, humility sensor, and the door sensor.

Daft question - but can I ask, what can we do with just a gateway…my understanding (although I’m likely wrong) is that we can play sounds and use the RGB light - is there anything else? Do the gateways have any sensors?

Gateway has illumination sensor.

No. :wink: What did you do to integrate the gateway into home assistant? Where does your source code come from?

@Syssi, thanks for you answer! aaah, that is what you mean.
This is the code i have used to integrate the xiaomi gateway to HA.

The next release of HA (0.50) includes a official component. If you update home assistant to 0.50dev and remove the custom_component the issue will be solved.

@Syssi, Oooh realy?! That would be nice! :smiley:
Nice, that so much people work on HA and the components to intergrate it. Nice! Thanks all!

@syssi can you link to the PR or commit for this ?

The PR is already merged. The “dev” branch of home assistant includes the official component already:

I have installed the dev branch by

pip install --upgrade 'git+https://github.com/home-assistant/home-assistant'

Hi Guys,
Im current try trying out HASS io, does anyone know what the command is to update to dev branch on that?

Hi FletchNZ, you just need to rename the components folder to custom_components. Then place it under /config

Update: Ignore that… still trying to get it works on Hass.io

is this xiaomi custom component not working in HASS IO ?

did you solve?