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

Enhance PhoneStateSensorManager with carrier information sensors #786

Merged
merged 2 commits into from Aug 20, 2020

Conversation

skynetua
Copy link
Contributor

@skynetua skynetua commented Aug 19, 2020

Fixes #768

PR enhance current PhoneStateSensorManager with 2 new sensors SIM_1 and SIM_2.
Untitled

Sensors require api level 22 or above. Moreover attributes {"carrier id", "mcc", "mnc", "is opportunistic", "data roaming"} require api 29+

I didn't add OnSubscriptionsChangedListener so sensors will be updated only on regular basis

Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

LGTM, also tested debug APK on my Google Fi phone and all data looks to be good too

@JBassett JBassett added enhancement New feature or request patch A tiny change - Bumps patch build number labels Aug 19, 2020
@skynetua skynetua requested a review from JBassett August 20, 2020 09:52
@JBassett JBassett merged commit fd62b0e into home-assistant:master Aug 20, 2020
@skynetua skynetua deleted the carrier-information-sensors branch August 25, 2020 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed enhancement New feature or request patch A tiny change - Bumps patch build number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add carrier information as sensor
4 participants