Skip to content

More Mobile app sensor fixes#22914

Merged
cgarwood merged 4 commits into
devfrom
mobile_app-sensor-fixes-deux
Apr 9, 2019
Merged

More Mobile app sensor fixes#22914
cgarwood merged 4 commits into
devfrom
mobile_app-sensor-fixes-deux

Conversation

@robbiet480
Copy link
Copy Markdown
Contributor

Description:

Discovered an issue where we weren't limiting what previously loaded entities would do with new sensor registrations or sensor updates. This limits things so that only the entity matching the unique ID of the sensor handles its own updates. It also ensures that only one entity handles registering new sensors. Finally, it includes some debug logging to ease development of apps.

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2019

Codecov Report

Merging #22914 into dev will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #22914      +/-   ##
==========================================
+ Coverage   93.83%   93.83%   +<.01%     
==========================================
  Files         448      448              
  Lines       36578    36574       -4     
==========================================
- Hits        34324    34321       -3     
+ Misses       2254     2253       -1
Impacted Files Coverage Δ
homeassistant/components/heos/config_flow.py 100% <0%> (ø) ⬆️
homeassistant/components/uk_transport/sensor.py 94.16% <0%> (+0.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38f063a...8eceebe. Read the comment docs.

Comment thread homeassistant/components/mobile_app/webhook.py Outdated
@robbiet480 robbiet480 requested a review from OttoWinter April 9, 2019 07:45
@cgarwood cgarwood merged commit fd8d974 into dev Apr 9, 2019
@ghost ghost removed the in progress label Apr 9, 2019
@delete-merged-branch delete-merged-branch Bot deleted the mobile_app-sensor-fixes-deux branch April 9, 2019 09:49
pvizeli pushed a commit that referenced this pull request Apr 10, 2019
* Ensure we only add a sensor once

* Ensure that we dont process updates for entities that arent what we were setup for

* Add debug logging to ease development of apps

* Use str representation
@pvizeli pvizeli mentioned this pull request Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants