Skip to content
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

Add tests for MQTT and Operations #106

Merged
merged 8 commits into from
Oct 17, 2024
Merged

Add tests for MQTT and Operations #106

merged 8 commits into from
Oct 17, 2024

Conversation

Prior99
Copy link
Contributor

@Prior99 Prior99 commented Oct 16, 2024

This PR adds tests for MQTT and all operations.

This also fixes some issues along the lines:

  • We forgot to expose set_charge_mode as an operation
  • We didn't wait until a topic was actually subscribed to
  • Some aliases in the events from MQTT were wrong
  • We didn't wait until the client is actually disconnected in mqtt.disconnect
  • When using honk_and_flash with only flash, the wrong MQTT operation was awaited

And improves some other things:

  • Events are now dataclasses
  • CLI code is no longer taken into account for coverage report

@Prior99 Prior99 changed the title Add tests for MQTT Add tests for MQTT and Operations Oct 17, 2024
Copy link
Contributor

@WebSpider WebSpider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Minor remark: Maybe we limit python to the version that HA supports as we ship the release. Right now this is 3.12 only.

@WebSpider WebSpider merged commit c4e0075 into main Oct 17, 2024
4 checks passed
@WebSpider WebSpider deleted the test_mqtt branch October 18, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants