bdr9
(Brandon Rothweiler)
February 20, 2022, 3:22pm
21
Hi @HWiese1980 . I submitted a PR to add the binary sensors about a month ago. It is currently in review. Once it is merged, HVAC control will be next.
home-assistant:dev
← bdr99:mazda-binary-sensors
opened 05:12AM - 21 Jan 22 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
This PR adds binary sensor entities to the Mazda integration.
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] New feature (which adds functionality to an existing integration)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/21277
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] The code has been formatted using Black (`black --fast homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [x] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [x] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
The integration reached or maintains the following [Integration Quality Scale][quality-scale]:
<!--
The Integration Quality Scale scores an integration on the code quality
and user experience. Each level of the quality scale consists of a list
of requirements. We highly recommend getting your integration scored!
-->
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [x] 🏆 Platinum
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io
1 Like
bdr9
(Brandon Rothweiler)
February 20, 2022, 3:24pm
22
@Fuglem I don’t think there are any issues with the device tracker. Can you describe the problem you are seeing?
Fuglem
February 21, 2022, 8:47am
23
There is no device tracker for the car. Only the other sensors. Was working good until the 2022.2 update. Have tried to remove and add it again, but still no device tracker.
fvant
(Frank van Tol)
February 21, 2022, 4:01pm
24
The charge level + odometer did not update during charging (last 4 hours). When i force a refresh in the app on my phone, HA shows the updated values after 4 minutes. Is this a fluke or should i not rely on this data for automation (charge schedule) ?
HWiese1980
(Hendrik Wiese)
February 23, 2022, 7:08am
25
I feel like MyMazda has been very unreliable regarding the actuality of the provided data. I don’t know if it’s suitable for automation.
1 Like
bdr9
(Brandon Rothweiler)
February 23, 2022, 2:18pm
26
That’s strange. I don’t think there is anything in the code that would prevent the device tracker entity from being created. Are you sure the entity is not disabled? It should appear under the “Diagnostic” section on the device page.
bdr9
(Brandon Rothweiler)
February 23, 2022, 2:20pm
27
I am planning to add a button entity that will refresh the vehicle data. This will have the same effect as refreshing the data in the phone app. It will only work for electric vehicles.
1 Like
Fuglem
February 24, 2022, 4:57pm
28
Will have a closer look. HA-installation down at the moment, waiting for parts. But I will Keep you posted.
bdr9
(Brandon Rothweiler)
March 5, 2022, 2:49am
29
For those who are interested, I submitted a PR to add button entities to the Mazda integration. This includes the refresh button which should update the charge level for electric vehicles.
home-assistant:dev
← bdr99:mazda-buttons
opened 05:53AM - 04 Mar 22 UTC
<!--
You are amazing! Thanks for contributing to our project!
Please, DO N… OT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did this.
This piece of text is published with the release notes, so it helps if you
write it towards our users, not us.
Note: Remove this section if this PR is NOT a breaking change.
-->
All Mazda services except `mazda.send_poi` are deprecated and have been replaced by button entities. Please use the button entities instead.
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
Replace Mazda services with button entities. The `send_poi` service cannot be replaced with a button entity because it takes additional arguments.
![screenshot of button entities](https://user-images.githubusercontent.com/2292715/156708218-4f94cb63-1083-42b1-891b-01c1161f126a.png)
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] New feature (which adds functionality to an existing integration)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/21894
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] The code has been formatted using Black (`black --fast homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [x] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
The integration reached or maintains the following [Integration Quality Scale][quality-scale]:
<!--
The Integration Quality Scale scores an integration on the code quality
and user experience. Each level of the quality scale consists of a list
of requirements. We highly recommend getting your integration scored!
-->
- [ ] No score or internal
- [ ] 🥈 Silver
- [ ] 🥇 Gold
- [x] 🏆 Platinum
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/en/development_checklist.html
[manifest-docs]: https://developers.home-assistant.io/docs/en/creating_integration_manifest.html
[quality-scale]: https://developers.home-assistant.io/docs/en/next/integration_quality_scale_index.html
[docs-repository]: https://github.com/home-assistant/home-assistant.io
1 Like
bdr9
(Brandon Rothweiler)
April 6, 2022, 2:56pm
30
Home Assistant 2022.4 was released today, and it includes several new features for the Mazda integration:
Binary sensors for doors, trunk, hood, and plugged in/not plugged in.
Button entities for start engine, stop engine, turn on hazard lights, turn off hazard lights. Also, for electric vehicles, a button entity to refresh the vehicle status.
A switch entity to toggle charging for electric vehicles.
(All of the services are deprecated except for send_poi
. Please use the button entities and switch entity instead.)
More info about the new features can be found in the documentation . I’d appreciate if anyone could test these new features (particularly the EV features since I don’t have an MX-30!) and let me know if they are working or if you have any issues.
2 Likes
Townsmcp
(James T)
April 16, 2022, 7:56pm
31
Fingers crossed the integration just works for the CX-60. I ordered the CX-60 a few days after the global unveiling so when it comes around autumn time (fingers crossed) I will be able to give feedback
1 Like
bdr9
(Brandon Rothweiler)
April 16, 2022, 8:21pm
32
Awesome! Once you get your car, it would be great if you could comment here to let us know if it’s working.
1 Like
Fuglem
April 20, 2022, 9:18am
33
everything works perfect on my MX-30, thanks for all the great work!
1 Like
gerbenz
(Gerben)
May 8, 2022, 8:12am
34
hello people,
can someone help me to gett the tyre prssure from PSI to Bar?
i don’t know how to do. i use it wit MX30
bdr9
(Brandon Rothweiler)
May 9, 2022, 2:51pm
35
Hi @gerbenz . In Home Assistant 2022.6 you will be able to change the unit of measurement for the tire pressure sensor entities. It will look like this:
1 Like
gerbenz
(Gerben)
May 10, 2022, 7:28pm
36
Can’t find the option
I’m not on the right version???
And where do i gett 6.2022
bdr9
(Brandon Rothweiler)
May 10, 2022, 7:41pm
37
@gerbenz It’s not released yet. It will be released in June.
Townsmcp
(James T)
May 16, 2022, 10:11pm
39
Had an email from Mazda - the new car will be at the dealers in September can then let you know how it all goes for the integration from then
1 Like
bdr9
(Brandon Rothweiler)
June 18, 2022, 2:38am
40
I’ve been working on adding climate control to the integration, and I think I’ve got it working. For anyone who has an MX-30 (@Fuglem ), I could use some help testing this feature. To test it, just download the below zip file and extract the mazda
folder from the zip file into your custom_components
folder. The custom_components
folder should be located in the same folder as configuration.yaml
. Then, restart HA and you should see the climate entity.
I’d appreciate any feedback you can provide! The front and rear defrosters can be controlled using the presets on the climate entity.
https://www.dropbox.com/s/s6ku9rz2ei62d8x/MazdaClimateTest2.zip?dl=1