Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Fix tests and add warning note on README #239

Merged
merged 6 commits into from
Mar 14, 2020

Conversation

azogue
Copy link
Contributor

@azogue azogue commented Mar 14, 2020

Changes

  • Remove remote platform related code
  • Complete ZLL sensor integration test:
    • Setup binary sensor, adds 1 full ZLL sensor from bridge 1
    • Check generated entity state and attrs
    • Check add_to_hass logic
    • Check behavior for changes in presence or temperature,
      cover strange SML logic around the "changed" attribute
    • Check discovery and setup of a new sensor in bridge 2
    • Cover the error when a data update is received before finishing entity setup
    • Check entity and schedule listener removal on HA stop
  • Added note about CC aproach and warn about refresh rate

Please @robmarkcole, feel free to fix the note in the readme, as I'm far from being a native and I'm never sure about my style :)

* Remove remote-platform related
* Complete ZLL sensor tests:
  - Setup binary sensor, adds 1 full ZLL sensor from bridge 1
  - Check generated entity state and attrs
  - Check add_to_hass logic
  - Check behavior for changes in presence or temperature,
  cover strange SML logic around the "changed" attribute
  - Check discovery and setup of a new sensor in bridge 2
  - Cover the error when a data update is received before finishing entity setup
  - Check entity and schedule listener removal on HA stop
so there is only one setup pass here, the initial one with:
```yaml
binary_sensor:
- platform: huesensor
  scan_interval: 2
```

(To achieve 1Hz freq, ommit the `scan_interval` value)
* No need for an integration test without remote,
  moving all to test_binary_sensor
* Just 1 hass fixture with 2 bridges
@codecov-io
Copy link

codecov-io commented Mar 14, 2020

Codecov Report

❗ No coverage uploaded for pull request base (remove-remotes@ca471a8). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                @@
##             remove-remotes     #239   +/-   ##
=================================================
  Coverage                  ?   96.69%           
=================================================
  Files                     ?        5           
  Lines                     ?      242           
  Branches                  ?        0           
=================================================
  Hits                      ?      234           
  Misses                    ?        8           
  Partials                  ?        0
Impacted Files Coverage Δ
custom_components/huesensor/data_manager.py 100% <ø> (ø)
custom_components/huesensor/hue_api_response.py 95.23% <100%> (ø)

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 ca471a8...82e8d3f. Read the comment docs.

@azogue azogue changed the title WIP: fix tests Fix tests and add warning note on README Mar 14, 2020
@robmarkcole
Copy link
Owner

LGTM, thanks!

@robmarkcole robmarkcole merged commit 7dc21bf into robmarkcole:remove-remotes Mar 14, 2020
@azogue azogue mentioned this pull request Mar 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants