wez / govee2mqtt

Govee2MQTT: Connect Govee lights and devices to Home Assistant
MIT License
426 stars 24 forks source link

Transition to power on and off not working as expected. #185

Open danktankk opened 4 months ago

danktankk commented 4 months ago

Govee Device SKU

H6008

Govee2MQTT Version

2024.04.29-30cf7732

Describe the issue

Transition on and off with a very simple automation doesn't appear to work using a motion sensor as a trigger using home assistant 2024.5

Startup Diagnostics

s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started GOVEE_API_KEY=REDACTED GOVEE_MQTT_HOST=core-mosquitto GOVEE_TEMPERATURE_SCALE=F GOVEE_EMAIL=REDACTED GOVEE_PASSWORD=REDACTED GOVEE_MQTT_PASSWORD=REDACTED GOVEE_MQTT_USER=addons GOVEE_MQTT_PORT=1883 ++ cd /app ++ exec /app/govee serve [2024-05-03T18:33:47 INFO govee::commands::serve] Starting service. version 2024.04.29-30cf7732 [2024-05-03T18:33:47 INFO govee::commands::serve] Querying platform API for device list [2024-05-03T18:33:47 INFO govee::commands::serve] Querying undocumented API for device + room list [2024-05-03T18:33:49 INFO govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted. [2024-05-03T18:33:49 INFO govee::commands::serve] Starting LAN discovery [2024-05-03T18:33:49 INFO govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted. [2024-05-03T18:33:49 INFO govee::commands::serve] Waiting 10 seconds for LAN API discovery [2024-05-03T18:33:59 INFO govee::commands::serve] Devices returned from Govee's APIs [2024-05-03T18:33:59 INFO govee::commands::serve] Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) [2024-05-03T18:33:59 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-05-03T18:33:59 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-05-03T18:33:59 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-05-03T18:33:59 INFO govee::commands::serve] [2024-05-03T18:33:59 INFO govee::commands::serve] Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) [2024-05-03T18:33:59 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-05-03T18:33:59 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-05-03T18:33:59 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=false [2024-05-03T18:33:59 INFO govee::commands::serve] [2024-05-03T18:33:59 INFO govee::service::http] http server addr is 0.0.0.0:8056 [2024-05-03T18:34:06 INFO govee::service::hass] Wait 500ms for hass to settle on 10 entity configs [2024-05-03T18:34:06 INFO govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted. [2024-05-03T18:34:19 INFO govee::service::state] requesting update via Platform API Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) None [2024-05-03T18:34:19 INFO govee::service::state] requesting update via Platform API Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) None

Additional Logs

[2024-05-03T18:28:28 INFO govee::service::hass] Command for Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008): {"state":"OFF"} [2024-05-03T18:28:28 INFO govee::service::state] Using Platform API to set Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) light powerSwitch state [2024-05-03T18:28:28 INFO govee::service::hass] Command for Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008): {"state":"OFF"} [2024-05-03T18:28:28 INFO govee::service::state] Using Platform API to set Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) light powerSwitch state [2024-05-03T18:28:29 INFO govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: OnOff, instance: "powerSwitch", value: Number(0), state: Object {"status": String("success")} } } [2024-05-03T18:28:29 INFO govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: OnOff, instance: "powerSwitch", value: Number(0), state: Object {"status": String("success")} } } [2024-05-03T18:28:34 INFO govee::service::state] Polling Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) to get latest state after control [2024-05-03T18:28:34 INFO govee::service::state] requesting update via Platform API Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) Some(DeviceState { on: true, light_on: Some(true), online: Some(true), kelvin: 6500, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 85, scene: None, source: "PLATFORM API", updated: 2024-05-03T22:22:48.602891179Z }) [2024-05-03T18:28:34 INFO govee::service::state] Polling Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) to get latest state after control [2024-05-03T18:28:34 INFO govee::service::state] requesting update via Platform API Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) Some(DeviceState { on: true, light_on: Some(true), online: Some(true), kelvin: 6500, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 85, scene: None, source: "PLATFORM API", updated: 2024-05-03T22:22:48.591937727Z }) [2024-05-03T18:28:37 INFO govee::service::hass] Command for Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008): {"state":"ON","transition":6.0,"brightness":85,"color_temp":153} [2024-05-03T18:28:37 INFO govee::service::hass] Command for Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008): {"state":"ON","transition":6.0,"brightness":85,"color_temp":153} [2024-05-03T18:28:37 INFO govee::service::state] Using Platform API to set Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) brightness [2024-05-03T18:28:37 INFO govee::service::state] Using Platform API to set Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) brightness [2024-05-03T18:28:38 INFO govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: Range, instance: "brightness", value: Number(85), state: Object {"status": String("success")} } } [2024-05-03T18:28:38 INFO govee::service::state] Using Platform API to set Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) color temperature [2024-05-03T18:28:38 INFO govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: Range, instance: "brightness", value: Number(85), state: Object {"status": String("success")} } } [2024-05-03T18:28:38 INFO govee::service::state] Using Platform API to set Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) color temperature [2024-05-03T18:28:38 INFO govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: ColorSetting, instance: "colorTemperatureK", value: Number(6535), state: Object {"status": String("success")} } } [2024-05-03T18:28:38 INFO govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: ColorSetting, instance: "colorTemperatureK", value: Number(6535), state: Object {"status": String("success")} } } [2024-05-03T18:28:43 INFO govee::service::state] Polling Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) to get latest state after control [2024-05-03T18:28:43 INFO govee::service::state] requesting update via Platform API Guest Bedroom 1 (E1:97:60:74:F4:CE:B5:E4 H6008) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 6500, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 85, scene: None, source: "PLATFORM API", updated: 2024-05-03T22:28:34.585491470Z }) [2024-05-03T18:28:43 INFO govee::service::state] Polling Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) to get latest state after control [2024-05-03T18:28:43 INFO govee::service::state] requesting update via Platform API Guest Bedroom 2 (8E:FA:60:74:F4:B6:B5:C8 H6008) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 6500, color: DeviceColor { r: 0, g: 0, b: 0 }, brightness: 85, scene: None, source: "PLATFORM API", updated: 2024-05-03T22:28:34.648617554Z })

Home Assistant Logs

No response

Anything else?

I have the automation set for the guest bedroom and the transition to turn the lights on/off over 3 or 4 seconds worked fine for the lifx bulbs I was using, but not for the govee lights. I increased it to 6 seconds just to see, no change.

Please let me know if you need any other logs.

danktankk commented 4 months ago

good talk. learned a lot