@Andre_Mens thanks for the response. After making that change, the light is no longer “unavailable”. However, it also doesn’t work correctly. If I turn on the light via HA, it doesn’t actually turn on and then it is listed as off again in HA (presumably after the API call to get the current state). I’ve included a snippet of the log below that (I think) shows the turn on and then the API saying it’s still off.
2022-08-10 11:10:39.268 DEBUG (MainThread) [govee_api_laggat.api] state returned from API: {'data': {'device': '65:4B:A4:C1:38:B2:29:79', 'model': 'H6160', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 100}, {'color': {'r': 255, 'b': 0, 'g': 255}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='65:4B:A4:C1:38:B2:29:79', model='H6160', device_name='Office LED Strip', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=254, color=(255, 255, 0), color_temp=0, timestamp=1660151439.268444, source=<GoveeSource.API: 'api'>, error=None, lock_set_until=1660151351.867474, lock_get_until=1660151352.867501, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2022-08-10 11:10:39.269 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.266 seconds (success: True)
2022-08-10 11:10:50.818 DEBUG (MainThread) [custom_components.govee.light] async_turn_on for Govee light 65:4B:A4:C1:38:B2:29:79, kwargs: {}
2022-08-10 11:10:50.819 DEBUG (MainThread) [govee_api_laggat.api] control 65:4B:A4:C1:38:B2:29:79: {'name': 'turn', 'value': 'on'}
2022-08-10 11:10:59.004 DEBUG (MainThread) [custom_components.govee.light] _async_update
2022-08-10 11:10:59.004 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] get_states
2022-08-10 11:10:59.094 DEBUG (MainThread) [govee_api_laggat.api] state returned from API: {'data': {'device': '65:4B:A4:C1:38:B2:29:79', 'model': 'H6160', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 100}, {'color': {'r': 255, 'b': 0, 'g': 255}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='65:4B:A4:C1:38:B2:29:79', model='H6160', device_name='Office LED Strip', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=254, color=(255, 255, 0), color_temp=0, timestamp=1660151459.094414, source=<GoveeSource.API: 'api'>, error=None, lock_set_until=1660151451.918567, lock_get_until=1660151452.9186, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2022-08-10 11:10:59.095 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.091 seconds (success: True)
2022-08-10 11:11:19.003 DEBUG (MainThread) [custom_components.govee.light] _async_update
2022-08-10 11:11:19.004 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] get_states
2022-08-10 11:11:19.276 DEBUG (MainThread) [govee_api_laggat.api] state returned from API: {'data': {'device': '65:4B:A4:C1:38:B2:29:79', 'model': 'H6160', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 100}, {'color': {'r': 255, 'b': 0, 'g': 255}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='65:4B:A4:C1:38:B2:29:79', model='H6160', device_name='Office LED Strip', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=254, color=(255, 255, 0), color_temp=0, timestamp=1660151479.275613, source=<GoveeSource.API: 'api'>, error=None, lock_set_until=1660151451.918567, lock_get_until=1660151452.9186, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2022-08-10 11:11:19.276 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.274 seconds (success: True)
In this second snippet, I turned the light on with the Govee app (which didn’t register in HA) but then turned it on in HA. I would expect on the next API call that it would see it was on, but it is listed as off (even though it was on at the time). Not sure what to make of that…
2022-08-10 11:15:59.260 DEBUG (MainThread) [govee_api_laggat.api] state returned from API: {'data': {'device': '65:4B:A4:C1:38:B2:29:79', 'model': 'H6160', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 100}, {'color': {'r': 255, 'b': 0, 'g': 255}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='65:4B:A4:C1:38:B2:29:79', model='H6160', device_name='Office LED Strip', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=254, color=(255, 255, 0), color_temp=0, timestamp=1660151759.260025, source=<GoveeSource.API: 'api'>, error=None, lock_set_until=1660151451.918567, lock_get_until=1660151452.9186, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2022-08-10 11:15:59.261 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.255 seconds (success: True)
2022-08-10 11:16:16.338 DEBUG (MainThread) [custom_components.govee.light] async_turn_on for Govee light 65:4B:A4:C1:38:B2:29:79, kwargs: {}
2022-08-10 11:16:16.340 DEBUG (MainThread) [govee_api_laggat.api] control 65:4B:A4:C1:38:B2:29:79: {'name': 'turn', 'value': 'on'}
2022-08-10 11:16:19.002 DEBUG (MainThread) [custom_components.govee.light] _async_update
2022-08-10 11:16:19.002 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] get_states
2022-08-10 11:16:19.080 DEBUG (MainThread) [govee_api_laggat.api] state returned from API: {'data': {'device': '65:4B:A4:C1:38:B2:29:79', 'model': 'H6160', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 100}, {'color': {'r': 255, 'b': 0, 'g': 255}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='65:4B:A4:C1:38:B2:29:79', model='H6160', device_name='Office LED Strip', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=254, color=(255, 255, 0), color_temp=0, timestamp=1660151779.080216, source=<GoveeSource.API: 'api'>, error=None, lock_set_until=1660151777.626942, lock_get_until=1660151778.626981, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2022-08-10 11:16:19.081 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.079 seconds (success: True)
2022-08-10 11:16:39.003 DEBUG (MainThread) [custom_components.govee.light] _async_update
2022-08-10 11:16:39.003 DEBUG (MainThread) [govee_api_laggat.govee_api_laggat] get_states
2022-08-10 11:16:39.267 DEBUG (MainThread) [govee_api_laggat.api] state returned from API: {'data': {'device': '65:4B:A4:C1:38:B2:29:79', 'model': 'H6160', 'properties': [{'online': 'false'}, {'powerState': 'off'}, {'brightness': 100}, {'color': {'r': 255, 'b': 0, 'g': 255}}]}, 'message': 'Success', 'code': 200}, resulting state object: GoveeDevice(device='65:4B:A4:C1:38:B2:29:79', model='H6160', device_name='Office LED Strip', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=False, power_state=False, brightness=254, color=(255, 255, 0), color_temp=0, timestamp=1660151799.267288, source=<GoveeSource.API: 'api'>, error=None, lock_set_until=1660151777.626942, lock_get_until=1660151778.626981, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
2022-08-10 11:16:39.268 DEBUG (MainThread) [custom_components.govee.light] Finished fetching govee data in 0.265 seconds (success: True)
Let me know if there is additional information I can provide.
Thanks!
Paul