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

fix: Improve a couple of things in MQTT sync from Teslamate #698

Merged
merged 4 commits into from
Aug 28, 2023

Conversation

cguedel
Copy link
Contributor

@cguedel cguedel commented Aug 27, 2023

Fixes #689

  • parse boolean strings for is_climate_on, locked, sentry_mode
  • add sync for plugged_in
  • add sync for charge_port_door_open
  • add sync for trunk_open
  • add sync for frunk_open
  • add sync for is_user_present
  • add sync for is_preconditioning

cguedel and others added 2 commits August 27, 2023 17:57
- parse boolean strings for is_climate_on, locked, sentry_mode
- add sync for plugged_in
- add sync for charge_port_door_open
- add sync for trunk_open
- add sync for frunk_open
- add sync for is_user_present
- add sync for is_preconditioning
@alandtse
Copy link
Owner

Thanks. I think the test failure may be unrelated but there's some lint issues. Can you please address?

@cguedel cguedel changed the title Improve a couple of things in MQTT sync from Teslamate Fix: Improve a couple of things in MQTT sync from Teslamate Aug 27, 2023
@cguedel cguedel changed the title Fix: Improve a couple of things in MQTT sync from Teslamate fix: Improve a couple of things in MQTT sync from Teslamate Aug 27, 2023
@cguedel
Copy link
Contributor Author

cguedel commented Aug 27, 2023

Should be ok now I think, no idea about the tests though

@alandtse alandtse merged commit 08305ed into alandtse:dev Aug 28, 2023
@oakedcorn
Copy link

Thanks for the fix!
There's a typo in the code here:

def cast_trunk_open(val: str) -> int:
    """Convert bool string to trunk/frunk open/close value."""
    return 255 if cast_bool(str) else 0

cast_bool(str) should be cast_bool(val)

@cguedel
Copy link
Contributor Author

cguedel commented Aug 28, 2023

Sorry about that, I'll take care of today

@oakedcorn
Copy link

No worries, thanks for supporting this great integration!

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.

MQTT boolean conversion issue
3 participants