homebridge-switchbot: Bug: Bot not working anymore under 1.0.0

Describe The Bug

updateCharacteristic failed

To Reproduce

I added the Bot’s device ID to in order to configure it as Press or Switch. The bug crashes the whole homebridge instance. I can only get it working when I hide the Bot device

Expected behavior

it should work

Relevant log output

Bot Bot 5F failed to refresh status, Error Message: "Cannot read properties of undefined (reading 'updateCharacteristic')"

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "openToken": "SECRET",
                "notice": "Keep your token a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "FF0A3A38F35F",
                        "hide_device": true,
                        "deviceType": "Bot",
                        "bot": {
                            "mode": "switch",
                            "switch": false
                        }
                    }
                ],
                "refreshRate": 30,
                "pushRate": 1
            },
            "platform": "SwitchBot"
        }

Screenshots

No response

Device & Model

SwitchBot Bot

Node.js Version

v16.13.0

NPM Version

v8.1.1

Homebridge Version

v1.3.6

Homebridge Switchbot Plugin Version

1.0.0

Homebridge Config UI X Plugin Version

v4.41.2

Operating System

Debian

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22

Commits related to this issue

Most upvoted comments

@yjeanrenaud perfect! I have release v1.0.1