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 battery sensor to iCloud #29818

Merged
merged 4 commits into from Dec 14, 2019

Conversation

Quentame
Copy link
Member

@Quentame Quentame commented Dec 10, 2019

Breaking Change:

None, addition

Description:

Follows #28968

Add battery sensor for each iDevice of your account.

Pull request with documentation for home-assistant.io : home-assistant/home-assistant.io#11434

iCloud device list
Capture d’écran 2019-12-10 à 13 50 09

iCloud device details
Capture d’écran 2019-12-10 à 13 50 04

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.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

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

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

@project-bot project-bot bot added this to Needs review in Dev Dec 10, 2019
@project-bot project-bot bot moved this from Needs review to By Code Owner in Dev Dec 10, 2019
@Quentame Quentame force-pushed the icloud/add-battery-sensor branch 2 times, most recently from 4d36ea5 to a3fa8fe Compare December 11, 2019 16:34
Dev automation moved this from By Code Owner to Reviewer approved Dec 13, 2019
homeassistant/components/icloud/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/icloud/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/icloud/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/icloud/sensor.py Outdated Show resolved Hide resolved
Dev automation moved this from Reviewer approved to Review in progress Dec 13, 2019
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Do we want to use the builtin update interval or should we connect a state update to the dispatch helper signal, for the sensor?

@Quentame
Copy link
Member Author

I think that would be better with a dispatch signal, it’s gonna avoid the 30s default and when iCloud interval is 1 min sensors are updated in HA for 1 min 30 actually.

Will look into it.

@balloob
Copy link
Member

balloob commented Dec 14, 2019

We can also look into it at the next PR

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Final comment.

homeassistant/components/icloud/sensor.py Outdated Show resolved Hide resolved
Dev automation moved this from Review in progress to Reviewer approved Dec 14, 2019
@MartinHjelmare
Copy link
Member

Can be merged when build passes.

@Quentame
Copy link
Member Author

build passes 😊

@MartinHjelmare MartinHjelmare merged commit 8207809 into home-assistant:dev Dec 14, 2019
Dev automation moved this from Reviewer approved to Done Dec 14, 2019
@Quentame Quentame deleted the icloud/add-battery-sensor branch December 14, 2019 22:52
@lock lock bot locked and limited conversation to collaborators Dec 16, 2019
@Quentame
Copy link
Member Author

I've just added the dispatch signal in this PR #30680

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants