Beshelmek / govee_ble_lights

Govee BLE Lighting Integration for HomeAssistant
MIT License
51 stars 14 forks source link

Issue with changing colors [H617F] #36

Open ChristopherEverett opened 2 months ago

ChristopherEverett commented 2 months ago

Version of the integration

e612cf6

Device setup

Govee Bluetooth LED Lights: H617F Integration: Govee BLE Light Advanced Entity: GOVEE Light Hub:GBK_H617F_41DE

Describe the bug

I have a basic, fresh out of the box, setup of govee_ble_lights. It detected my H617F LEDs right away, and I am able to turn them of and on from the Entities menu, but I get no response when I try to change the color of the LEDs using either the "Favorite Color" options, or the color wheel. When this Entity was added my LEDs automatically changed from the color they were previously set on to plain Red. The error provided below is brought up when I attempt to change the color using either of the methods available.

This might need to be a separate issue, but the brightness slider is not working how I expect it as well. It will brighten or dim, but seemingly randomly. For example 47% is brighter than 70%, but 48% is dimmer than 47%.

Debug log

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:239 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 5:22:24 PM (14 occurrences) Last logged: 6:58:33 PM

[139669230260032] 'NoneType' object has no attribute 'write_gatt_char'
[139669040286144] 'NoneType' object has no attribute 'write_gatt_char'

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 631, in async_handle_light_on_service await light.async_turn_on(**filter_turn_on_params(light, params)) File "/config/custom_components/govee-ble-lights/light.py", line 277, in async_turn_on await client.write_gatt_char(UUID_CONTROL_CHARACTERISTIC, command, False) ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'write_gatt_char'

wilwizard1979 commented 1 month ago

I have a very similar problem. I have 2 LED strips in my kids rooms. Both are H617E and when I change the color in the colorwheel nothing happens. In one room it is always blue and only the brightness and On-Off works. In the other room the brightness will change the brightness and color of the strip. It would be great if this could work.