Xiaomi Gateway Integration

Replying to myself: If anyone has the same issue - use virtualenv. This did the trick for me.

Hi to everyone,

I have a doubt and hope that someone can help me. After xioami did the firmware update where we can see the battery level in HA as @Bieniu says, https://community-assets.home-assistant.io/original/2X/c/c06223f3cb159154da8f01b5c62374e9a394ca84.PNG

How i can show only the battery levels in a group in main page of HA?

thanks

9v battery i think. Mounted to the ceiling using screws

Yeah. Of course i tested it to test the API :grinning: the alarm sounded in about 5 seconds when smoke is detected.

Hi,

new firmware version of smart home gateway 1.4.1_145 someone knows what’s new in this version?

Create template sensors for the battery and then add those to the group^^

~Cheers

You could use that Dynamic icon based on battery level (iOS)

Can someone help me? I am looking forward to test this. Again I know it is a noob question sorry for that.

I’m using this for my iPhones (*3) but unless I am missing something its necessary to define the template for every battery.
Its quite a lot of work. I have ~10 sensors and decided not to bother :slight_smile:

Don’t put the whole repository inside the custom_components. Put only what is inside the components folder in the custom_components folder.

1 Like

Thank you so much! I will do it and report back! Please tell me another thing I should put after the key what is in the app after “token”: right?? Thank you so much once again.

Can you show image how that look?

Sure here you go.

Biksem

Thanks men, but did not working for me, where i need to add this line?
all my code for smart home xiaomi is on customize.yaml
when i add this line to my config, that still did not show, what i miss:?

Big Thanks!

So, has anyone updated to the new 145 firmware, release yesterday? Everything working smoothly?

Hi @abmantis,

I updated, and all more or less is the same in HA, but in the Mi App, many times i have problems to control radio, or light gateway with in the LAN, but with 3G/4G, all works well.

1 Like

Add it in your sensor section, remember to change the values in my code to your unique values

states.binary_sensor.door_window_sensor_158d00011c7eac <- change this as appropriate
lounge_door_status: <- change this as appropriate
friendly_name: ‘Lounge Front Door’ <- change this as appropriate

sensor: 
  - platform: template
    sensors:
      lounge_door_status:
        value_template: '{% if states.binary_sensor.door_window_sensor_158d00011c7eac %}
          {% if states.binary_sensor.door_window_sensor_158d00011c7eac.state == "on" %}
            Open
          {% else %}
            Closed
          {% endif %}
          {% else %}
            n/a
          {% endif %}'
        friendly_name: 'Lounge Front Door'
1 Like

There is a pre-formatted text button you can highlight your text and click so spaces become visible and probably more helpful, copyable.

so

space:

  • platform: spacing:
    spacer: ‘Space Space Space Space Space Space’
    space: ‘{% if states.ispace.sensor.state == “paste.with.no.code.block”%} Invisible {%- else -%} Visible {%- endif -%}’

becomes

space:
  - platform: spacing:
        spacer: 'Space Space Space Space Space Space'
          space: '{% if states.ispace.sensor.state ==  "paste.with.no.code.block"%} Invisible {%- else -%} Visible {%- endif -%}'

See pretty picture

Thanks, fixed up :slight_smile:

Hi All,

i need help, randomly my binary_sensor change the status to on. how to fix it?

Many Thanks

Have you tried turning it off and on again?

That is, power off and power on hub. Restart Hass. Walk past sensor / wave, or open close door.