* start test setup
test cleanup
test deps
update switch test
actually update test deps
cleanup and remove switch from coveragerc
comment
refactor to use fixtures and shared components
lint
* remove availability part that isn't in zha yet
* review comments and cleanup
* review comments
* add switch back unil post reorg merge
* Added SmartThings component and switch platform
* Corrected comment typos.
* Embedded switch platform.
* Replaced custom view usage with webhook component.
* Replaced urls with tokens in strings.
* Fixed line length.
* Use generated webhook id instead of static one.
* Reuse core constant instead of defining again.
* Optimizations in anticipation of future platforms.
* Use async_generate_path instead of hard-coded path.
* Fixed line length.
* Updates per review feedback.
* Updates per latest review feedback.
* Moving existing sensor file
* Initial functionality in place
* Added test for config flow
* Updated coverage and CODEOWNERS
* Linting
* Linting
* Member comments
* Hound
* Moving socket disconnect on HASS stop
* Member comments
* Removed unnecessary dispatcher call
* Config entry fix
* Added support in config flow for good accounts with no devices
* Hound
* Updated comment
* Member comments
* Stale docstrings
* Stale docstring
* 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
* fix for smoke detection
* a tilted window is now considered as "open"/on
* changed comparison to enum
* line length
* insert brackets for line length and comparison
* indentation should now be ok for hound
changed api version to 0.10.4
* indentation should now be ok for hound
changed api version to 0.10.4
* updating requirement files
* satisfy lint
* 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 gamut capability to color util
* Include gamut in hue_test
* Improve Philips Hue color conversion
* correct import for new location hue.light
* include file changes between PR's
* update aiohue version
* update aiohue version
* update aiohue version
* fix hue_test
Now Idea why it failed compared to the previous time
* Include gamut in hue_test
* fix hue_test
* Try to test hue gamut conversion
supply a color that is well outside the color gamut of the light, and see if the response is correctly converted to within the reach of the light.
* switch from gamut A to gamut B for the tests.
* remove white space in blanck line
* Fix gamut hue test
* Add Gamut tests for the util.color
* fix hue gamut test
* fix hue gamut test
* Improve Philips Hue color conversion
* Initial pass of cleanup for shabbat_times
* Switch to async defs
* First pass of unit tests + fixture data
* Completion of first round of unit tests, 100% passing
* Unit tests for state restoring
* Style fixes
* More style fixes
* Lint fix
* Add upcoming candelighting and havdalah sensors
* Add unit tests, remove havdalah offset
* More unit tests + small bugfix for weekly_portion
* Add issur melacha sensor
* Remove old shabbat_times work-in-progress files
* Bump required version of hdate
* Add havdalah offset config parameter
* Bump hdate version required
* Pin hdate requirement
* Lint fixes
* Changes based on review + API changes for hdate 0.8.7
* Add three-day holiday unit tests
* Remove debugging line
* Add missing docstring
* Fix doc lint comment
* 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
* 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
* Added Zones, and removed available() logic
flesh out Zones
tidy up init
some more tidying up
Nearly there - full functionality
passed txo - ready to send PR
Ready to PR, except to remove logging
Add Zones and associated functionality to evohome component
Add Zones to evohome (some more tidying up)
Add Zones to evohome (Nearly there - full functionality)
Add Zones to evohome (passed tox)
Add Zones to evohome (except to remove logging)
Add Zones and associated functionality to evohome component
Revert _LOGGER.warn to .debug, as it should be
Cleanup stupid REBASE
* removed a duplicate/unwanted code block
* tidy up comment
* use async_added_to_hass instead of bus.listen
* Pass evo_data instead of hass when instntiating
* switch to async version of setup_platform/add_entities
* Remove workaround for bug in client library
- using github version for now, as awaiting new PyPi package
* Avoid invalid-name lint - use 'zone_idx' instead of 'z'
* Fix line too long error
* remove commented-out line of code
* fix a logic error, improve REDACTION of potentially-sensitive infomation
* restore use of EVENT_HOMEASSISTANT_START to improve HA startup time
* added a docstring to _flatten_json
* Switch instantiation from component to platform
* Use v0.2.8 of client api (resolves logging bug)
* import rather than duplicate, and de-lint
* We use evohomeclient v0.2.8 now
* remove all the api logging
* Changed scan_interal to Throttle
* added a configurable scan_interval
* small code tidy-up, removed sub-function
* tidy up update() code
* minimize use of self.hass.data[]
* remove lint
* remove unwanted logging
* remove debug code
* correct a small coding error
* small tidyup of code
* remove flatten_json
* add @callback to _first_update()
* switch back to load_platform
* adhere to standards fro logging
* use new format string formatting
* minor change to comments
* convert scan_interval to timedelta from int
* restore rounding up of scan_interval
* code tidy up
* sync when in sync context
* fix typo
* remove raises not needed
* tidy up typos, etc.
* remove invalid-name lint
* tidy up exception handling
* de-lint/pretty-fy
* move 'status' to a JSON node, so theirs room for 'config', 'schedule' in the future
* 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.
In 0.7.x the API to HDate was cleaned up so as to move logic from homeassistant to
the HDate external library.
This commit removes all the superfluous code, updates the required tests and changes the
requirement from version 0.6.5 to 0.7.5
* initial tensorflow image_processing component
* linting fixes
* make displayed attribute a summary of objects
* fix missed merge conflict and add warning supression back in for CPU type
* restructure tensorflow component to install on the fly, remove from Docker
* add both matches and summary as attributes
* address review comments
* do not use deps folder as default, as it should only be managed by HA. Update to have tensorflow in root config directory
* 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
* Initial commit
* Sockets have been moved to separate component
* Sockets have been moved to separate component
* Fix const PLATFORM_SCHEMA
* Fix unique id
* Fix async_create_task
* Fix PLATFORM_SCHEMA
* Fix typo
* Remove pylint disable
* 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...
* Add support for Honeywell evohome CH/DHW systems
More flake8 corrections
Passes Flake8 tests
Almost passed flake8.pylint!
Passed all tox tests
Now it needs serious testing!
Almost ready to submit
BUGFIX: DHW state now functional
More improvements to available()
Solved the DHW temp units problem!
Last minute bug squash
to improve dicts merge
Trying to rebase
fixing more rbase errors
revert to creating HTTP_error_code internally for now
ready to submit PR
Added support for Honeywell evohome CH/DHW systems
* Updated requirements_test_all.txt
* Fix: D401 First line should be in imperative mood
* Remove _LOGGER.info (replace with _LOGGER.debug)
* raise PlatformNotReady when RequestException during setup()
* Revert some LOGGER.debug to LOGGER.warning
* Improved logging levels, and removed some unwanted comments
* Improvments to logging - additional self._status info
* BUGFIX: DHW wrongly showing available = False (and some other tweaks)
* Fix trailing whitespace
* Remove state_attributes override and API_VER code
* Removed heating zones, DHW and heuristics to reduce # lines of code
* Removed some more lines of code
* Removed unused configuration parameters
* Remove some more un-needed lines
* Removed more (uneeded) lines of code & fixed two minor typos
* Improvements to debug logging of available() = False
* Improvements to code, and code clean-up
* Corrected a minor typo
* A small tidy up
* reduces precision of emulated temps floats to 0.1
* Some code improvements as suggested by JeardM
* Rewrite of exception handler
* Removed another unwanted logging in properties
* Remove async_ version of various methods
* moved available heuristics to update()
* Cleanup of code, and re-work linter hints
* fixed a minor documentation typo
* scan_interval is now no longer a configurable option
* Change from Master/Slave to Parent/Child
* Removed the last of the slaves
* Removed the last of the masters
* Move -PARALLEL_UPDATES to .\climate\evohome.py'
* main code moved to climate/evohome.py
* merge EvoEntity into EvoController class
* remove should_poll (for now)
* woops! left a hint in
* removed icon
* only log a WARNING the first time available = False
* cleanup dodgy exception handling
* Tidy up exception handling
* Many changes as suggested by @MartinHjelmare, thanks
* remove hass from init, part 1
* use async_added_to_hass instead of dispatcher_connect
* remove hass from init, part 2 (done)
* add 1-2 arrays, and tidied up some comments
* from dispatcher to async_added_to_hass
* cleaned up some logging, and removed others
* Many changes as request by @MartinHjelmare
* Homage to the lint
* Changed to the HA of doing operating_mode
* Now using update_before_add=True
* reduced logging further still...
* fixed minor lint
* fix a small logic error
* Add device_state_attributes to track actual operating mode
* Clean up doc quotes caused by previous changes
* Woops! removed some debug lines that shoudln't have stayed in
* Add a complete set of device_state_attributes
* Cleanup some constants
* Remove more legacy code
* domain_data to evo_data & this else should be a finally
* minor change for readability
* Minor change for readability #2
* removed unused code
* small tidy up - no code changes
* fix minor lint
* Correct URLs & descriptions in docstring
* whoops - fixed a typo in docstrings
* remove an unused line of cide & a small tidy-up
* 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
* New service to load new devices from deCONZ without restarting HASS
* Do not use len to check if list is empty
* Add support for scenes to be updated as well
* Rework refresh devices method
* Fix test
* 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
* 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.
* Initial commit for deCONZ switch support
* Fix hound comment
* Fix martins comment; platforms shouldn't depend on another platform
* Fix existing tests
* New tests
* Clean up unnecessary methods
* Bump requirement to v43
* Added device state attributes to light
* Update to next version with enum states
* Change to generic dimmer class
* Update of requirement files
* Update to hmip lib to v0.9.7
* Missing update of requirements files
* Cleanup of icon properties
* Add python 3.7 to travis and tox
* Use pyyaml from github
* Don't version constraints
* Fix version tag
* Change to new pyyaml release
* Python 3.7 requires xenial
* Fix namespace detection
* Use correct RegEx type
* Update pexpect to 4.6
* Use correct validation for dictionaries
* Disable Py37 incompatible packages
* Upgrade all pexpect to 4.6
* Add explicit None as default param
* 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
* Add new device without restarting hass
* Remove debug prints
* Fix copy paste error
* Fix comments from balloob
Add tests to verify signalling with new added devices
* Fix hound comments
Add test to verify when new sensor is added
* Fix tests
* Unload entry should unsubscribe all deconz dispatchers
* Make sure mock setup also creates unsub in hass data
* Fix copy paste issue
* Lint
* Try config entries
* Testing
* Working flow
* Config entry text strings
* Removed manual inputs for config flow
* Support unloading of config entry
* Bump requirement to v33
* Fix comments from test
* Make sure that only one deCONZ instance can be set up
* Hass doesn't support unloading platforms yet
* Modify get_api_key to be testable
* Fix hound comments
* Add test dependency
* Add test for no key
* Bump requirement to v35
Add pydeconz to list of test components
* Don't have a check in async_setup that domain exists in hass.data