* Add a test for a homekit_controller switch
* Add a test for a homekit_controller lightbulb
* Add a test for homekit_controller thermostat
* Changes from review
* Patch utcnow to known time in HK tests
* Neater fixture use per review
* Added device tracker support for EE Brightbox 2
* removed timeago dependency
* get scanner checks and improved tests
* fixed lint issues
* removed redundant timeago from test requirements
* fixed variable naming in test
* removed unecessary blank line
* Add Mythic Beasts DNSAPI Component
* Added timeout, and tests for exceptions while updating
* Move API to external module
* Move mbddns import into function
* Updated tests to mock out mbddns library
* Updates to Harmony for web sockets
Updates to harmony to use web sockets with async
* Lint
* Small fixes
* Fix send_command
Continued improvements:
-) Fixed send_command
-) Get HUB configuration during update in case it was not retrieved earlier (i.e. HUB unavailable)
* Further improvements
Completely removed dependency on __main__ for pyharmony, instead everything is now done from the HarmonyClient class.
Writing out Harmony configuration file as a JSON file.
Using same functionality to determine if activity provided is an ID or name for device, allowing send_command to receive a device ID or device name.
* Point requirements to updated pyharmony repo
Updated REQUIREMENTS to point to repository containing the updates for pyharmony.
* lint
lint
* Small fix for device and activity ID
Small fix in checking if provided device or activity ID is valid.
* Pin package version
* No I/O in event loop
* Point at HA fork with correct version bump
* Fix req
* Allow verisure locks to be configured with a default code
* linting fix
* PR feedback
* PR feedback - try harder to prevent future typos
A python mock is a magical thing, and will respond to basicaly
any method you call on it. It's somewhat better to assert against
an explicit variable named 'mock', rather than to assert on the
method name you wanted to mock... could prevent a typo from messing up
tests.
* PR feedback: convert tests to integration-style tests
Set up a fake verisure hub, stub out a _lot_ of calls, then test
after platform discovery and service calls.
It should be noted that we're overriding the `update()` calls in
these tests. This was done to prevent even further mocking of
the verisure hub's responses.
Hopefully, this'll be a foundation for people to write more tests.
* more pr feedback
* Added Entur departure information sensor.
* Fixed houndci-bot comments.
* Removed tailing whitespace.
* Fixed some comments from tox lint.
* Improved docstring, i think.
* Fix for C1801
* Unit test for entur platform setup
* Rewritten entur component to have pypi dependecy.
* Propper client id for api usage.
* Minor cleanup of usage of constants.
* Made location output configurable.
* Cleaned up usage of constants.
* Moved logic to be contained within setup or update methods.
* Moved icon consts to root in module.
* Using config directly in test
* Minor changes
* 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
* Initial stuff
* More work in place
* Starting with tests
* Device registry in place
* Hound
* Linting
* Member comments (including extracting device registry)
* Member comments (plus I forgot cleanup!)
* Hound
* More Hound
* Removed old import
* Adding config entry test to coverage
* Updated strings
* Add srp_energy
* Update message on TypeError. Add check for None state.
* Add check for none in history
* Add srpenergy to Test requirements.
* Add srpenergy to requirments.
* Change = to ==.
* Change import for srpenergy
* Fix Flak8 errors
* Add srp to gen requirements script
* Change config name.
* Add daily usage test
* Add test for daily usage.
* Fix Flake8 message.
* Remove blank after docstring.
* Add srpenergy to coverage
* Bump requires version to srpenergy
* Fix type in coverage. Import from Sensor. Use dict.
* Update to 1.0.5. Check credentials on setup. Standalone test.
* Fix formating.
* Remove period. Rename _ variables.
* Fix rebase merge
* Add rebase requirement
* Improve Mock Patching.
* ID is added to cards without ID in ui-lovelace.yaml when loaded
* Hound
* Remove ui-lovelace.yaml
* Nicer get
* Update tests
* If YAML dump fails, config not gone
* Add tests
* Woof!
* Remove nosetests
* Address comments
* Woof...
* Delete test.yaml
* update rights to saved file
* fix
* line break
* First commit
* Feature complete?
* Add dependency
* Move setting poe mode logic to library
* Use guard clauses
* Bump requirement to 2
* Simplify saving switches with poe off
* Store and use poe mode
* Fix indentation
* Fix flake8
* Configuration future proofing
* Bump dependency to v3
* Add first test
* Proper use of defaults with config flow (thanks helto)
* Appease hound
* Make sure there can't be duplicate entries of combination host+site
* More tests
* More tests
* 98% coverage of controller
* Fix hound comments
* Config flow step init not necessary
* Use async_current_entries to check if host and site for controller is used
* Remove storing/restoring poe off devices to slim PR
* First batch of switch tests
* More switch tests.
* Small improvements and clean up
* Make tests pass
Don't name device in device registry
* Dont process clients that belong to non-UniFi POE switches
* Allow selection of site from a list in config flow
* Fix double blank lines in method
* Update codeowners
* Add notify.homematic_signalgen
* Update homematic_signalgen.py, test_homematic_signalgen.py
* Added new files to .coveragerc
* Fixed review comments from houndci-bot
* Fixed pylint errors
* Regenerate requirements_test_all.txt by script/gen_requirements_all.py
* Fix flake8 warnings
* Renamed notify.homematic_signalgen to notify.homematic and made it generic
* Update .coveragerc and requirements_test_all.txt
* Removed the terms signal generator from the sources.
* SMHI Component
* Clean up typos
* Fixed default values first config to home location (tests will follow)
* Fixed tests and removed unused function
* Minor fixup after comments from @kane610
* add support for precipitation in forecast
* Removed old async_step_init not needed.
* YesssSMS handling more errors, upgrade to version 0.2.1
- handling missing internet connection nicely
- disabling login with non-working credentials (website locked account for 1 hour)
- upgrade to new upstream version of YesssSMS
* notify.yessssms tests
* test requirements
* flake8 fix
* fixing tests, new upstream version 0.2.3
fixing tests based on requested changes, coverage
* removing unmotivated print
* passing exception to ConnectionError and SMSSendingError logger
* Google Maps supports battery level and charging.
With 3.0.2 locationsharinglib now the battery level and the charging attributes are available.
* Update google_maps.py
fix too long line error
* Update google_maps.py
Fix multi line import, and line length limit
* Update gen_requirements_all.py
Add locationsharinglib to gen_requirements_all
* update requirements_all
* Last try to fix requirements_all...
* Use pyspcwebgw library.
* Support alarm triggering.
* Update requirements.
* Add pyspcwebgw to test reqs.
* Also update script.
* Use dispatcher.
* Address review feedback.
* initial version of geojson platform
* unit tests for geo json platform added; smaller bugfixes and code cleanups
* fixing pylint issues
* moved all code accessing the external feed into separate library; refactored platform and tests to work with that new library
* fixing lint
* small refactorings
* Initial commit for jewish calendar sensor
* Make check for logging errors into it's own function
* Can't use f-strings as we need to support python3.5
* Implement basic functionality: printing of date
* Update requirements_all.txt
* Allow user to specify date for sensor
* Add hdate to test requirements
* Update to match pull request
* Support date output in hebrew
* Limit languages to english and hebrew
* Add name back to sensor
* Change icon to be calendar-today
* Add multiple sensors
* Fix tests
* Make Hound happy, remove unused imported class
* hdate expects datetime.date not datetime.datetime
* Return sensor name
* Times should be returned as time object, not datetime
* Add myself to codeowners for jewish calendar component
* Return actual reading, not index
* Add more tests. Currently failing.
Will need to update hdate API and version before continuing.
* Fix weekly portion test
* Make all tests pass
* Make travis happy and add a test so it doesnt happen again
* Remove defaults in __init__ method
* Change sensor state variable to local variable in update() method
* Minor changes
* add a component for hangouts
* add a notify component for hangouts
* add an extra message as title
* add support to listen to all conversations hangouts has
* move hangouts to package and add parameter documentation
* update .coveragerc and requirements_all.txt
* makes linter happy again
* bugfix
* add conversations parameter to command words
* Move the resolution of conversation names to conversations in own a function
* typo
* rename group of exclusion form 'id' to 'id or name'
* refactoring and use config_flow
* makes linter happy again
* remove unused imports
* fix not working regex commands
* fix translations
* cleanup
* remove step_init
* remove logging entry
* clean up events
* move constant
* remove unsed import
* add new files to .converagerc
* isort imports
* add hangouts_utils to ignored packages
* upadte doc and format
* fix I/O not in executor jon
* rename SERVICE_UPDATE_USERS_AND_CONVERSATIONS to SERVICE_UPDATE
* move EVENT_HANGOUTS_{CONNECTED,DISCONNECTED} to dispatcher
* add config flow tests
* Update tox.ini
* Adding noaa-tides changes to new branch.
* Fix typo in .coverageac
* Incorporate @MartinHjelmare and @fabaff changes.
* Disable pylint error and add error message for unavailable station.
* Two spaces before inline comments
* Increment py_noaa version to 0.3.0
* Updated requirements.py
* Minor changes
* Add new public transport sensor for RMV (Rhein-Main area).
* Add required module.
* Fix naming problem.
* Add unit test.
* Update dependency version to 0.0.5.
* Add new requirements.
* Fix variable name.
* Fix issues pointed out in review.
* Remove unnecessary code.
* Fix linter error.
* Fix config value validation.
* Replace minutes as state by departure timestamp. (see ##14983)
* More work on the timestamp. (see ##14983)
* Revert timestamp work until #14983 gets merged.
* Simplify product validation.
* Remove redundant code.
* Address code change requests.
* Address more code change requests.
* Address even more code change requests.
* Simplify destination check.
* Fix linter problem.
* Bump dependency version to 0.0.7.
* Name variable more explicit.
* Only query once a minute.
* Update test case.
* Fix config validation.
* Remove unneeded import.
* Change to newer pip package
The package Adafruit_Python_DHT==1.3.2 was broken and would not install, breaking DHT sensor support in Home assistant. It has since been fixed in Adafruit-DHT==1.3.3.
See: https://github.com/adafruit/Adafruit_Python_DHT/issues/99
* Update requirements_all.txt
New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.
* Comment out Adafruit-DHT
Adafruit_Python_DHT changed name to Adafruit-DHT, which still need pyx support breaking our CI, need to be comment out.
* Update requirements_all.txt
* Add HomematicIP Cloud to config flow
* Inititial trial for config_flow
* Integrations text files
* Load and write config_flow and init homematicip_cloud
* Split into dedicated files
* Ceanup of text messages
* Working config_flow
* Move imports inside a function
* Enable laoding even no accesspoints are defined
* Revert unnecassary changes in CONFIG_SCHEMA
* Better error handling
* fix flask8
* Migration to async for token generation
* A few fixes
* Simplify config_flow
* Bump version to 9.6 with renamed package
* Requirements file
* First fixes after review
* Implement async_step_import
* Cleanup for Config Flow
* First tests for homematicip_cloud setup
* Remove config_flow tests
* Really remove all things
* Fix comment
* Update picture
* Add support for async_setup_entry to switch and climate platform
* Update path of the config_flow picture
* Refactoring for better tesability
* Further tests implemented
* Move 3th party lib inside function
* Fix lint
* Update requirments_test_all.txt file
* UPdate of requirments_test_all.txt did not work
* Furder cleanup in websocket connection
* Remove a test for the hap
* Revert "Remove a test for the hap"
This reverts commit 968d58cba1.
* First tests implemented for config_flow
* Fix lint
* Rework of client registration process
* Implemented tests for config_flow 100% coverage
* Cleanup
* Cleanup comments and code
* Try to fix import problem
* Add homematicip to the test env requirements