hass-core/requirements_test_all.txt
Andrew Hayworth eb6b6ed87d Add Awair sensor platform (#18570)
* Awair Sensor Platform

This commit adds a sensor platform for Awair devices, by accessing
their beta API. Awair heavily rate-limits this API, so we throttle
updates based on the number of devices found. We also allow for the
user to bypass API device listing entirely, because the device list
endpoint is limited to only 6 calls per day. A crashing or restarting
server would quickly hit that limit.

This sensor platform uses the python_awair library (also written
as part of this PR), which is available for async usage.

* Disable pylint warning for broad try/catch

It's true that this is generally not a great idea, but we really don't
want to crash here. If we can't set up the platform, logging it and
continuing is the right answer.

* Add space to satisfy the linter

* Awair platform PR feedback

- Bump python_awair to 0.0.2, which has support for more granular exceptions
- Ensure we have python_awair available in test
- Raise PlatformNotReady if we can't set up Awair
- Make the 'Awair score' its own sensor, rather than exposing it other ways
- Set the platform up as polling, and set a sensible default
- Pass in throttling parameters to the underlying data class, rather
than use hacky global variable access to dynamically set the interval
- Switch to dict access for required variables
- Use pytest coroutines, set up components via async_setup_component,
  and test/modify/assert in generally better ways
- Commit test data as fixtures

* Awair PR feedback, volume 2

- Don't force updates in test, instead modify time itself and let
  homeassistant update things "normally".
- Remove unneeded polling attribute
- Rename timestamp attribute to 'last_api_update', to better reflect
  that it is the timestamp of the last time the Awair API servers
  received data from this device.
- Use that attribute to flag the component as unavailable when data
  is stale. My own Awair device periodically goes offline and it really
  hardly indicates that at all.
- Dynamically set fixture timestamps to the test run utcnow() value,
  so that we don't have to worry about ancient timestamps in tests
  blowing up down the line.
- Don't assert on entities directly, for the most part. Find desired
  attributes in ... the attributes dict.

* Patch an instance of utcnow I overlooked

* Switch to using a context manager for timestream modification

Honestly, it's just a lot easier to keep track of patches. Moreover,
the ones I seem to have missed are now caught, and tests seem to
consistently pass.

Also, switch test_throttle_async_update to manipulating time more
explicitly.

* Missing blank line, thank you hound

* Fix pydocstyle error

I very much need to set up a script to do this quickly w/o tox, because
running flake8 is not enough!

* PR feedback

* PR feedback
2018-11-25 09:01:19 +01:00

266 lines
5.7 KiB
Text

# Home Assistant test
# linters such as flake8 and pylint should be pinned, as new releases
# make new things fail. Manually update these pins when pulling in a
# new version
asynctest==0.12.2
coveralls==1.2.0
flake8-docstrings==1.3.0
flake8==3.6.0
mock-open==1.3.1
mypy==0.641
pydocstyle==2.1.1
pylint==2.1.1
pytest-aiohttp==0.3.0
pytest-cov==2.6.0
pytest-sugar==0.9.2
pytest-timeout==1.3.2
pytest==4.0.0
requests_mock==1.5.2
# homeassistant.components.homekit
HAP-python==2.4.1
# homeassistant.components.sensor.rmvtransport
PyRMVtransport==0.1.3
# homeassistant.components.sensor.transport_nsw
PyTransportNSW==0.1.1
# homeassistant.components.notify.yessssms
YesssSMS==0.2.3
# homeassistant.components.device_tracker.automatic
aioautomatic==0.6.5
# homeassistant.components.emulated_hue
# homeassistant.components.http
aiohttp_cors==0.7.0
# homeassistant.components.hue
aiohue==1.5.0
# homeassistant.components.unifi
aiounifi==3
# homeassistant.components.notify.apns
apns2==0.3.0
# homeassistant.components.calendar.caldav
caldav==0.5.0
# homeassistant.components.sensor.coinmarketcap
coinmarketcap==5.0.3
# homeassistant.components.device_tracker.upc_connect
defusedxml==0.5.0
# homeassistant.components.sensor.dsmr
dsmr_parser==0.12
# homeassistant.components.sensor.season
ephem==3.7.6.0
# homeassistant.components.evohome
# homeassistant.components.climate.honeywell
evohomeclient==0.2.7
# homeassistant.components.feedreader
feedparser==5.2.1
# homeassistant.components.sensor.foobot
foobot_async==0.3.1
# homeassistant.components.tts.google
gTTS-token==1.1.2
# homeassistant.components.geo_location.geo_json_events
# homeassistant.components.geo_location.nsw_rural_fire_service_feed
geojson_client==0.3
# homeassistant.components.sensor.geo_rss_events
georss_client==0.4
# homeassistant.components.ffmpeg
ha-ffmpeg==1.9
# homeassistant.components.hangouts
hangups==0.4.6
# homeassistant.components.mqtt.server
hbmqtt==0.9.4
# homeassistant.components.sensor.jewish_calendar
hdate==0.7.5
# homeassistant.components.binary_sensor.workday
holidays==0.9.8
# homeassistant.components.frontend
home-assistant-frontend==20181121.0
# homeassistant.components.homematicip_cloud
homematicip==0.9.8
# homeassistant.components.influxdb
# homeassistant.components.sensor.influxdb
influxdb==5.0.0
# homeassistant.components.dyson
libpurecoollink==0.4.2
# homeassistant.components.media_player.soundtouch
libsoundtouch==0.7.2
# homeassistant.components.luftdaten
luftdaten==0.3.4
# homeassistant.components.sensor.mfi
# homeassistant.components.switch.mfi
mficlient==0.3.0
# homeassistant.components.binary_sensor.trend
# homeassistant.components.image_processing.opencv
# homeassistant.components.image_processing.tensorflow
# homeassistant.components.sensor.pollen
numpy==1.15.4
# homeassistant.components.mqtt
# homeassistant.components.shiftr
paho-mqtt==1.4.0
# homeassistant.components.device_tracker.aruba
# homeassistant.components.device_tracker.cisco_ios
# homeassistant.components.device_tracker.unifi_direct
# homeassistant.components.media_player.pandora
pexpect==4.6.0
# homeassistant.components.pilight
pilight==0.1.1
# homeassistant.components.sensor.mhz19
# homeassistant.components.sensor.serial_pm
pmsensor==0.4
# homeassistant.components.prometheus
prometheus_client==0.2.0
# homeassistant.components.notify.pushbullet
# homeassistant.components.sensor.pushbullet
pushbullet.py==0.11.0
# homeassistant.components.canary
py-canary==0.5.0
# homeassistant.components.media_player.blackbird
pyblackbird==0.5
# homeassistant.components.deconz
pydeconz==47
# homeassistant.components.zwave
pydispatcher==2.0.5
# homeassistant.components.homematic
pyhomematic==0.1.52
# homeassistant.components.litejet
pylitejet==0.1
# homeassistant.components.media_player.monoprice
pymonoprice==0.3
# homeassistant.components.alarm_control_panel.nx584
# homeassistant.components.binary_sensor.nx584
pynx584==0.4
# homeassistant.components.openuv
pyopenuv==1.0.4
# homeassistant.auth.mfa_modules.notify
# homeassistant.auth.mfa_modules.totp
# homeassistant.components.sensor.otp
pyotp==2.2.6
# homeassistant.components.qwikswitch
pyqwikswitch==0.8
# homeassistant.components.sonos
pysonos==0.0.5
# homeassistant.components.spc
pyspcwebgw==0.4.0
# homeassistant.components.sensor.darksky
# homeassistant.components.weather.darksky
python-forecastio==1.4.0
# homeassistant.components.nest
python-nest==4.0.5
# homeassistant.components.sensor.awair
python_awair==0.0.2
# homeassistant.components.sensor.whois
pythonwhois==2.4.3
# homeassistant.components.tradfri
pytradfri[async]==6.0.1
# homeassistant.components.device_tracker.unifi
pyunifi==2.13
# homeassistant.components.notify.html5
pywebpush==1.6.0
# homeassistant.components.rainmachine
regenmaschine==1.0.7
# homeassistant.components.python_script
restrictedpython==4.0b6
# homeassistant.components.rflink
rflink==0.0.37
# homeassistant.components.ring
ring_doorbell==0.2.2
# homeassistant.components.media_player.yamaha
rxv==0.5.1
# homeassistant.components.simplisafe
simplisafe-python==3.1.13
# homeassistant.components.sleepiq
sleepyq==0.6
# homeassistant.components.smhi
smhi-pkg==1.0.5
# homeassistant.components.climate.honeywell
somecomfort==0.5.2
# homeassistant.components.recorder
# homeassistant.components.sensor.sql
sqlalchemy==1.2.14
# homeassistant.components.sensor.srp_energy
srpenergy==1.0.5
# homeassistant.components.statsd
statsd==3.2.1
# homeassistant.components.camera.uvc
uvcclient==0.10.1
# homeassistant.components.vultr
vultr==0.1.2
# homeassistant.components.wake_on_lan
# homeassistant.components.media_player.panasonic_viera
# homeassistant.components.media_player.samsungtv
# homeassistant.components.switch.wake_on_lan
wakeonlan==1.1.6
# homeassistant.components.cloud
warrant==0.6.1