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 traccar motion, speed and battery_level attributes #19090

Merged
merged 7 commits into from Dec 16, 2018

Conversation

Projects
None yet
3 participants
@ludeeus
Copy link
Member

ludeeus commented Dec 7, 2018

Description:

Adds more attributes to Traccar entities (if they are present):

  • battery_level
  • motion
  • speed

Requested here https://community.home-assistant.io/t/more-traccar-attributes/82779

Breaking change

Attributes will only exist if there is data to show for that attribute.

Example entry for configuration.yaml (if applicable):

device_tracker:
  - platform: traccar
    host: 192.168.2.11
    port: 8072

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).

@wafflebot wafflebot bot added the in progress label Dec 7, 2018

@MartinHjelmare MartinHjelmare changed the title Added motion, speed and battery_level attributes. Add traccar motion, speed and battery_level attributes Dec 16, 2018

MartinHjelmare and others added some commits Dec 16, 2018

Use dict[key] when we know there is a value there.
Co-Authored-By: ludeeus <joasoe@gmail.com>
Use dict[key] when we know there is a value there.
Co-Authored-By: ludeeus <joasoe@gmail.com>
Use dict[key] when we know there is a value there.
Co-Authored-By: ludeeus <joasoe@gmail.com>
Use dict[key] when we know there is a value there.
Co-Authored-By: ludeeus <joasoe@gmail.com>
Use dict[key] when we know there is a value there.
Co-Authored-By: ludeeus <joasoe@gmail.com>
Use dict[key] when we know there is a value there.
Co-Authored-By: ludeeus <joasoe@gmail.com>
@ludeeus

This comment has been minimized.

Copy link
Member

ludeeus commented Dec 16, 2018

Thanks @MartinHjelmare 🏅

@MartinHjelmare
Copy link
Member

MartinHjelmare left a comment

Good! Can be merged when build passes.

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Dec 16, 2018

Do we need to label it breaking change, since the attribute keys are now not always added?

@ludeeus

This comment has been minimized.

Copy link
Member

ludeeus commented Dec 16, 2018

Better safe than sorry when it comes to changes that may affect configurations/templates :)

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Dec 16, 2018

Please add a short paragraph to the PR description about the breaking change so we can copy it to the release notes.

@ludeeus

This comment has been minimized.

Copy link
Member

ludeeus commented Dec 16, 2018

Was the one I added not good (descriptive) enough? (at the bottom of the description)

@MartinHjelmare

This comment has been minimized.

Copy link
Member

MartinHjelmare commented Dec 16, 2018

Great! I moved it up for visibility.

@MartinHjelmare MartinHjelmare merged commit 92c5249 into home-assistant:dev Dec 16, 2018

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.08%) to 93.01%
Details

@wafflebot wafflebot bot removed the in progress label Dec 16, 2018

@ludeeus ludeeus deleted the ludeeus:traccar-attributes branch Dec 16, 2018

dshokouhi added a commit to dshokouhi/home-assistant that referenced this pull request Dec 25, 2018

Add traccar motion, speed and battery_level attributes (home-assistan…
…t#19090)

* Added motion, speed and battery attributes.

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

* Use dict[key] when we know there is a value there.

Co-Authored-By: ludeeus <joasoe@gmail.com>

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment