Skip to content

Add battery sensor to iCloud#29818

Merged
MartinHjelmare merged 4 commits into
home-assistant:devfrom
Quentame:icloud/add-battery-sensor
Dec 14, 2019
Merged

Add battery sensor to iCloud#29818
MartinHjelmare merged 4 commits into
home-assistant:devfrom
Quentame:icloud/add-battery-sensor

Conversation

@Quentame
Copy link
Copy Markdown
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.

Comment thread homeassistant/components/icloud/sensor.py Outdated
Comment thread homeassistant/components/icloud/sensor.py Outdated
Comment thread homeassistant/components/icloud/sensor.py Outdated
Comment thread homeassistant/components/icloud/sensor.py Outdated
Comment thread homeassistant/components/icloud/sensor.py Outdated
Comment thread homeassistant/components/icloud/sensor.py Outdated
@Quentame Quentame force-pushed the icloud/add-battery-sensor branch from 0f565ea to c61d7f2 Compare December 13, 2019 20:14
Comment thread homeassistant/components/icloud/device_tracker.py
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

balloob commented Dec 14, 2019

We can also look into it at the next PR

Copy link
Copy Markdown
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.

Comment thread homeassistant/components/icloud/sensor.py Outdated
@MartinHjelmare
Copy link
Copy Markdown
Member

Can be merged when build passes.

@Quentame
Copy link
Copy Markdown
Member Author

build passes 😊

@MartinHjelmare MartinHjelmare merged commit 8207809 into home-assistant:dev 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
Copy Markdown
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

None yet

Development

Successfully merging this pull request may close these issues.

4 participants