-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object of type MugFirmwareInfo is not JSON serializable #47
Comments
Hey. That does make sense as the object is not JSON serializable. It's surprising that is just blindly tries to dump the state into a JSON encoder, it could easily be serialized by using |
Oh ok, it turns out this isn't too major as the encoder in Home Assistant has some support for custom methods. I think it should work now as of 1.0.0 beta-2. |
Hi, I've tried 1.0.0 beta-2 and I think your fix has solved the problem. The error has stopped appearing in the HA logs and I can now see the mug firmware being reported on the MQTT statestream in MQTT explorer. Thanks for looking into it |
Awesome! Thanks for pointing it out. I'll close this then, but don't hesitate if you have other issues. |
Description
I have MQTT Statestream enabled in Home Assistant, and the Ember Mug Integration is causing errors each time the mug state changes because MugFirmwareInfo is not JSON serializable. I have had to temporarily exclude the mug state in the MQTT statestream config using an entity glob, this prevents the errors.
Logs / Errors
The text was updated successfully, but these errors were encountered: