rektdeckard / hues

A Rust client for the Philips Hue API v2
MIT License
1 stars 2 forks source link

`grouped_motion` deserialize error. #4

Open finnkauski opened 1 week ago

finnkauski commented 1 week ago

Just to flag a refresh on my setup caused:

2024-10-20T12:20:17.206917Z ERROR hues::api::v2: error decoding response body: unknown variant `grouped_motion`, expected one of `auth_v1`, `behavior_instance`, `behavior_script`, `bridge`, `bridge_home`, `button`, `camera_motion`, `contact`, `device`, `device_power`, `device_software_update`, `entertainment`, `entertainment_configuration`, `geofence`, `geofence_client`, `geolocation`, `grouped_light`, `homekit`, `light`, `light_level`, `matter`, `matter_fabric`, `motion`, `public_image`, `recipe`, `relative_rotary`, `room`, `scene`, `smart_scene`, `tamper`, `taurus_7455`, `temperature`, `z_g_p_connectivity`, `zigbee_bridge_connectivity`, `zigbee_connectivity`, `zigbee_device_discovery`, `zone` at line 1 column 7436 

It was a bad deserialize, seems like some enum variant is missing.

I had a motion sensor that I deleted and it worked.

rektdeckard commented 1 week ago

Wow, they really just YOLO and change their API spec whenever they feel like it lol. grouped_motion was not specified a few months ago. I'll update the deserialization code to recognize it, and to be tolerant of unrecognized types.