hsakoh / switchbot-mqtt

SwitchBot MQTT Home Assistant add-on
MIT License
41 stars 1 forks source link

failure when creating new passcode #6

Closed marcomow closed 11 months ago

marcomow commented 1 year ago

I'm using the createKey command in the MQTT device dashboard image

but the command fails, see the following logs I have from the add-on

13:51:32 fail: SwitchBotMqttApp.Services.MqttCoreService[0] subscribe action F1591E9D60F8,{ "CommandType": "command", "Command": "createKey", "ParamName": "btn", "ParamValue": "action" } System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Int64'. at SwitchBotMqttApp.Services.MqttCoreService.<>c__DisplayClass17_1.b__4(CommandPayloadDefinition paramDef) in C:\github\hsakoh\switchbot-mqtt\src\SwitchBotMqttApp\Services\MqttCoreService.cs:line 340 at System.Collections.Generic.List1.ForEach(Action1 action) at SwitchBotMqttApp.Services.MqttCoreService.ReceiveCommandAsync(String payloadRaw, DeviceBase device) in C:\github\hsakoh\switchbot-mqtt\src\SwitchBotMqttApp\Services\MqttCoreService.cs:line 335

hsakoh commented 1 year ago

https://github.com/hsakoh/switchbot-mqtt/issues/5#issuecomment-1739029591