FYI: Computing Scene Codes
I've been poking at things and found something that I think you may find useful, if you haven't already discovered this for yourself.

You can download a catalog of pre-defined scenes for a given sku; you need to pass the AppVersion header for it to return anything:

```console
$ curl "https://app2.govee.com/appsku/v1/light-effect-libraries?sku=H6072" -H 'AppVersion: 5.6.01' -s
```

Which produces data like the following abbreviated excerpt:

```json
{
  "message": "success",
  "status": 200,
  "data": {
    "categories": [
{
  "sceneId": 7691,
  "iconUrls": [
    "https://d1f2504ijhdyjw.cloudfront.net/deals-img/c1068ace12a82ee32333f5c35bbc154e-new_light_btn_scenes_four_color%403x.png",
    "https://d1f2504ijhdyjw.cloudfront.net/deals-img/9215bf8e3df86bd03eb32b93fd3f5b3b-new_light_btn_scenes_four_color_press%403x.png",
    "https://d1f2504ijhdyjw.cloudfront.net/deals-img/6b7e891d014ba5742fbbc02368e077e9-new_light_btn_scenes_four_color_dark%403x.png"
  ],
  "sceneName": "rainbow B",
  "analyticName": "rainbow B",
  "sceneType": 2,
  "sceneCode": 0,
  "scenceCategoryId": 0,
  "popUpPrompt": 0,
  "scenesHint": "",
  "rule": {
    "maxSoftVersion": "",
    "minSoftVersion": "",
    "maxHardVersion": "",
    "minHardVersion": "",
    "maxWifiSoftVersion": "",
    "minWifiSoftVersion": "",
    "maxWifiHardVersion": "",
    "minWifiHardVersion": ""
  },
  "lightEffects": [
    {
      "scenceParamId": 11837,
      "scenceName": "",
      "scenceParam": "ASkAAAAHAgH/gQD5FBQD+RQG/wAA/38A//8AAP8AAP//AAD/EADyAACAAA==",
      "sceneCode": 10191,
      "specialEffect": [],
      "cmdVersion": 1,
      "sceneType": 2,
      "diyEffectCode": [],
      "diyEffectStr": "",
      "rules": [],
      "speedInfo": {
        "config": "",
        "speedIndex": 0,
        "supSpeed": false
      }
    }
  ],
  "voiceUrl": "",
  "createTime": 0
},

],
"supportSpeed": 1
  }
}
```

The part of interest is the `sceneCode` in the `lightEffects` list; for the `Rainbow` above, ignore its direct `sceneCode: 0` and look inside its `lightEffects` list for its `sceneCode: 10191`

Armed with that you can now construct a BLE packet that will activate that scene:

`10191` is decimal; convert to hex to produce: `0x27cf` which you can break into two bytes and swap around, adding on to a scene mode packet:

```
0x33 0x05 0x04 0xcf 0x27
```

then zero-pad out to 19 bytes + checksum using your `generateCodeFromHexValues` helper and voila, you have a packet that you can send either via BLE or via the LAN `ptReal` command that will activate that scene.

I figured this out by following your suggestion of adding a one tap shortcut and looking at the resulting blueCmd I got back from the relevant endpoint:

```console
$ echo MwUEzycAAAAAAAAAAAAAAAAAANo= | base64 -d | xxd
00000000: 3305 04cf 2700 0000 0000 0000 0000 0000  3...'...........
00000010: 0000 00da                                ....
```

and when staring at some other data from the new HTTP platform API that returns scene codes, I realized that the code was embedded in that packet.

You could potentially use this to make it a bit more convenient in your UI (https://github.com/bwp91/homebridge-govee/wiki/Scene%2C-Music%2C-DIY-Modes#step-2-configure-the-code) to pre-populate a list of scene names for example, without having to run through the steps in the app.

I haven't looked at DIY scenes so far, just these basic/pre-defined scenes.






