Google Home and emulated hue

Google home and emulated hue works great together but as soon I’m restarting HA I’m losing the configuration in the Google Home app. So lights and switches that are connected to a room i.e. living room, after the restart are connected to different rooms.

Anything that can be done about it? Can that be something that I missed in the configuration?

1 Like

Yes please can somebody fix it or point out what/how this should be used as it is quite annoying.

Now i’m trying to use HASS groups to group the lights and expose the groups to G_Home (i.e. not assigning them in G_Home) but it creates a bit of a mess :slight_smile:

Known issue. The ids are not persisting between restarts. Just stick to the Home Assistant groups for now and hope someone will fix it :thumbsup:

3 Likes

Hopefully someone can fix this. I was using Home Assistant groups but then Google Home is unable to change the brightness. I’ve had to go back to using my Philips Hue and ST hub for Google Home control.

A quick patch to fix this issue (basically, just sort the list by entity_id in HueAllLightsStateView before assigning numbers):

--- components/emulated_hue/hue_api.py.orig     2017-01-24 18:53:20.639796437 +0000
+++ components/emulated_hue/hue_api.py  2017-01-24 18:52:32.210042299 +0000
@@ -68,7 +68,7 @@
         hass = request.app['hass']
         json_response = {}
 
-        for entity in hass.states.async_all():
+        for entity in sorted(hass.states.async_all(), key=lambda state: state.entity_id):
             if self.config.is_entity_exposed(entity):
                 state, brightness = get_entity_state(self.config, entity).

A fix for that is coming in the next release if I’m not mistaken.