* - Change how we extract the metrics for sensors
- Add component filtering as seen in influxdb
- Add metric override as seen in influxdb
- Add more unit tests with actual device data
* Extract sensor metric logic to separate handlers
* Update prometheus dependency
* Format using black
* Format using black
* Fix flake8
* Move sensor metric handler list to init
* Use f strings instead of .format
* initial working version
* support configured unit system and convert distance automatically
* properly unloading integration when removed and stopping refreshes
* ran isort
* fixed pylint
* introduced time filter of seven days into past
* adding unit tests
* fixed lint
* removed unused code
* added test case
* added test case for config flow
* fixed lint
* fixed comment
* removed unused test code
* increased test coverage
* fixed filtering by time
* changed wording in config flow
* reformatted with black
* removed unused logger
* fixed black
* changed default mmi
* reduced the options in the config flow form; fixed a few schema options and processing of data
* moved unsubscribing signals
* fixed minimum magnitude and modified tests
* fixed radius in imperial unit system
* increased test coverage
* simplified code
* fixed lint
* changed string formatting; simplified code
* removed unused strings
* added translation
Use new hdate version of library which uses pytz for timezones.
dateutil expects /usr/share/timezone files, as these are not available
in the docker image and in HASSIO, the timezone offsets are broken.
This should fix
- #23032
- #18731
* Upgrade pydocstyle to 4.0.0 and flake8-docstrings to 1.3.1
http://www.pydocstyle.org/en/4.0.0/release_notes.html#july-6th-2019
* Address pydocstyle D413's
* tox: do not run pydocstyle
Does not seem to add any value over flake8-docstrings (and would have
needed a D202 exclusion).
* Convert sensor setup to async
* Improve sensor unique ids
* Save some indent levels, use f-string formatting
* Require getmac in tests
* Fix RouterData init in tests
* Make discovery_info optional in async_setup_platform signature
* Initial work on config_flow
* Finish config flow
* Pylint checks, make sure the import only happens once
* Added support for unloading, small fixes
* Check in the hassfest output files
* Flake8 fixes
* pylint mistake after flake8 fixes
* Work on comments
* Abort the import if it is already imported
* More comments resolved
* Added testcases for velbus config flow
* Fix pylint and flake8
* Added connection test to the config flow
* More sugestions
* renamed the abort reason
* excluded all but the config_flow.py from the velbus component in coveragerc
* Rewrote testcases with a patched version of _test_connection
* Docstyle fixes
* Updated the velbus testcases
* just yield
* flake8 fixes
* Bump simplisafe-python to 4.0.0 + add additional SimpliSafe attributes
* Fixed incorrect attr assignment
* Member comments
* Add system ID as a state attribute
* Add support for World Wide Lightning Location Network
* Updated .coveragerc
* Added test
* Updated requirements
* Fixed tests
* Use local time for nearest strike
* Base geo location in place
* Finished geolocation work
* Fixed tests
* Cleanup
* Removed no-longer-needed method
* Updated requirements
* Add support for window and attrs
* Add strike ID to entity name
* Member comments
* Update sleepyq to 0.7
Fixes crash when working with a single sleeper.
* sleepiq: Handle null side definitions
These happen if no sleeper is defined for a side of the bed. Don't
create sensors for null sides; they'll crash every time we try to use
them.
* sleepiq: Fix urls mocked to match sleepyq 0.7
* sleepi: Fix test_sensor.TestSleepIQSensorSetup
Sleepyq 0.7 throws on empty strings, so we have to specify them.
* sleepiq: Test for ValueError thrown by sleepyq 0.7
* sleepiq: Drop no longer used HTTPError import
* sleepiq: Add tests for single sleeper case
* sleepiq: Shorten comments to not overflow line length
* sleepiq: Use formatted string literals for adding suffixes to test files
* sleepiq: Use str.format() for test suffixing
* initial version of qfes bushfire geolocation platform
* removed all occurrences of legally protected names; using new georss library
* regenerated codeowners
* fixed pylint
* added one more valid category
* moved library import to top and ran isort
* Update aioswitcher requirement to 2019.4.26.
* Removed unnecessary legacy function call.
* Fixed log message capital first letter.
* Replaced None argument with empty dict.
* Replaced guard.
* Added ServiceCallType.
* Added set_auto_off and update_device_name services to the component.
* Added test cases for service calls.
* Conditioned the component services registry with the platform discovery.
* Update homeassistant/components/switcher_kis/__init__.py
Co-Authored-By: TomerFi <tomer.figenblat@gmail.com>
* Update homeassistant/components/switcher_kis/__init__.py
Co-Authored-By: TomerFi <tomer.figenblat@gmail.com>
* Resolved change requests.
* Added ContextType.
* Addes permission verification for service calls.
* Added test cases for permision verification and more.
* Replaced POLICY_CONTROL with the more suited POLICY_EDIT.
* More appropriate function name.
* Added domain and entity_id validation for calling services.
* Removed service for setting the vendor's device name.
* Support ZLO device types
Support the device types that are added in https://github.com/zigpy/zigpy/pull/176
so newer Zigbee devices can be supported.
* Remove BINARY_SENSOR mappings
* Add back ON_OFF_LIGHT_SWITCH, DIMMER_SWITCH and COLOR_DIMMABLE_LIGHT
Since they are target devices I've added them as switch and lights,
which matches the Zigbee documentation.
* Upgrade to zigpy-homeassistant v0.5.0
To be able to use the new DeviceTypes
* Add APRS device tracker component
This component keeps open a connection to the APRS-IS infrastructure so
messages generated by filtered callsigns can be immediately acted upon.
Any messages with certain values for the 'format' key are position
reports and are parsed into device tracker entities.
* Log errors and return if startup failure
* Fix unit tests
* CREATE Somfy component
* CREATE cover Somfy platform
* USE somfy id as unique id
* UPDATE all the devices in one call to limit the number of call
* FIX Don't load devices if not yet configured
* IMP Replace configurator by a simple notification
* ADD log in case state does not match
* IMP wording
* REMOVE debug stuf
* ADD support for tilt position
* UPDATE requirements
* FIX Use code instead of authorization response
- Will allow to setup Somfy without https
* HANDLE stateless devices (Somfy RTS)
* FIX import locally 3rd party library
* UPDATE pymfy to 0.4.3
* ADD missing docstring
* FIX For Somfy 100 means closed and 0 opened
* FIX position can be None
* ENHANCE error management when error 500 occurs at setup
* FIX indent
* ROLLBACK tilt modification
- See https://community.home-assistant.io/t/somfy-tahoma-official-api/61448/90?u=tetienne
* FIX Look for capability instead of state
* DON'T use exception to test if a feature is available
* UPDATE dependency
* ADD device_info property
* AVOID object creation in each method
* REMOVE unused constants
* ADD missing doc
* IMP Only make one call to add_entities
* USE dict[key] instead of get method
* IMP Don't pass hass object to the entities
* FIX Don't end logging messages with period
* USE config entries instead of a cache file
* IMPLEMENT async_unload_entry
* CONSOLIDATE package
- see home-assistant/architecture#124
* UPDATE to pymfy 0.5.1
* SIMPLIFY config flow
* ADD French translation
* FIX 80 vs 79 max length
* ABORT flow asap
* FIX A tupple was returned
* MIGRATE to manifest.json
* ADD a placeholder async_setup_platform coroutine
- It's currently required and expected by the platform helper.
* FIX codeowner
* ADD missing translations file
* USE new external step
* UPGRADE pymfy version
* Close Somfy tab automatically
* ADD manufacturer
- Somfy only for the moment.
* HANDLE missing code or state in Somfy request
* REMOVE unused strings
* DECLARE somfy component to use config_flow
* APPLY static check remarks
* FIX async method cannot be called from sync context
* FIX only unload what has been loaded during entry setup
* DON't catch them all
* DON'T log full stacktrace
* ABORT conflig flow if configuration missing
* OMIT Somfy files for coverage
* ADD tests about Somfy config flow
* ADD pymfy to the test dependencies
* Adds AdGuard Home integration
* 👕 Addresses linting warnings
* 🚑 Fixes typehint in async_setup_entry
* 👕 Take advantage of Python's coalescing operators
* 👕 Use adguard instance from outer scope directly in service calls
* 👕 Use more sensible scan_interval default for sensors
* 👕 Adds specific files to .coveragerc
* ☔ Added tests and small changes to improve coverage
* 🔨 Import adguardhome dependencies at the top
* 🚑 Converted service handlers to be async
* 🔥 Removed init step from config flow
* Revert back to previously used library
* Fix test
* Remove unused import
* Fix import
* Update __init__.py
* Update __init__.py
* Fix test after rebase
* Use global import for ESPHome
* Add aioesphomeapi to test requirements
aioesphomeapi is also shipped as a pure-python wheel, so this should not impact test install time
* Improved sensors
* Lib update signalling
* Replace reason with changed
* Move imports to top of file
* Add support for secondary temperature reported by some Xiaomi devices
* Bump dependency to v59
* Proof of concept
* Follow comments
* Fix line length and bad imports
* Move imports to top
* Exception handling for unicode decoding
Create debug print for new service types
Add empty test files
* First try at a test
* Add type and name to service info
Fix static check
* Add aiozeroconf to test dependencies
* ptvsd debugger component.
* Add test case
* ptvsd as test dependency
* Fix for 3.5
* Fixed bootstrap test
* Use dict direct lookup.
* Don't need to load dependencies.
* Get the test working.
* 3.5 fix
* Set mock return value
* Put tests back, but skip them
* Change log level
* Implement EnOcean temperature and humidity sensors.
* Bump EnOcean version to 0.50
* Refactor components for more generic device handling
* Move radio packet data interpretation to specific devices
* Update CODEOWNERS
* Implement code review changes
* Added component named switcher_kis switcher water heater integration.
* Fixed conflicts.
* Updated requirements.
* Added manifest.json file and updated CODEOWNERS.
* Fixed requirements_all.txt.
* Better component tests.
* Removed unnecessary parameter from fixture function.
* Removed tests section from mypy.ini.
* Remove unused ENTITY_ID_FORMAT.
* Stop udp bridge when failed to setup the component.
* Replace DISCOVERY_ constants prefix with DATA_.
* Various change requests.
* Fixed constant name change remifications.
* Added explicit name to fixture.
* Various change requests.
* More various change requests.
* Added EventType for homeassistant.core.Event.
* Switched from event driven data distribution to dispatcher type plus clean-ups.
* Removed name and icon keys from the component configuration.
* Various change requests.
* Various change reqeusts and clean-ups.
* Removed unnecessary DEPENDENCIES constant from swith platform.
* Replaced configuration data guard with assert.
* Removed unused constants.
* Removed confusing type casting for mypy sake.
* Refactor property device_name to name.
* Removed None guard effecting mypy only.
* Removed unnecessary function from switch entity.
* Removed None guard in use by mypy only.
* Removed unused constant.
* Removed unnecessary context manager.
* Stopped messing around with mypy.ini.
* Referring to typing.TYPE_CHECKING for non-runtime imports.
* Added test requierment correctyly.
* Replaced queue.get() with queue.get_nowait() to avoid backing up intervals requests.
* Revert changes in mypy.ini.
* Changed attributes content to device properties instead of entity properties.
* Fixed typo in constant name.
* Remove unnecessary async keyword from callable.
* Waiting for tasks on event loop to end.
* Added callback decorator to callable.
* Load dependencies from manifests. Fallback to current DEPENDENCIES
* Fix typing
* Ignore typing correctly
* Split out dependency processing to a new method
* Fix tests
* Only pull from manifest if dependencies is non empty
* Inline temporary function
* Fix light tests [skip ci]
* Fix tests/common
* Fix some mqtt tests [skip ci]
* Fix tests and component manifests which have only one platform
* Fix rflink tests
* Fix more tests and manifests
* Readability over shorthand format
* Fix demo/notify tests
* Load dependencies from manifests. Fallback to current DEPENDENCIES
* Load requirements from manifests. Fallback to current REQUIREMENTS
* Fix typing
* Ignore typing correctly
* Split out dependency processing to a new method
* Only pull from manifest if dependencies is non empty
* Inline temporary function
* Fix tests and component manifests which have only one platform
* Fix rflink tests
* Readability over shorthand format
* Clean up requirements
* Use integration to resolve deps/reqs
* Lint
* Lint
* revert a change
* Revert a test change
* Fix types
* Fix types
* Add back cache for load component
* Fix test_component_not_found
* Move light.test and device_tracker.test into test package instead with manifest to fix tests
* Fix broken device_tracker tests
* Add docstrings to __init__
* Fix all of the light tests that I broke earlier
* Embed the test.switch platform to fix other tests
* Embed and fix the test.imagimage_processing platform
* Fix tests for nx584
* Add dependencies from platform file's DEPENDENCIES
* Try to setup component when entity_platform is setting up
Fix tests in helpers folder
* Rewrite test_setup
* Simplify
* Lint
* Disable demo component if running in test
Temp workaround to unblock CI tests
* Skip demo tests
* Fix config entry test
* Fix repeat test
* Clarify doc
* One extra guard
* Fix import
* Lint
* Workaround google tts
## Description:
Generate requirements_* from manifests (if present). If not, fallback to the current approach of reading `REQUIREMENTS` from the module attribute. I disabled exploring the children of the `homeassistant.components.*` packages since that will just add a dependency (from the manifest) due to each of the python files in the package. Just having one for the top level package should be sufficient.
**Related issue (if applicable):** relates to #22700
## Checklist:
- [x] The code change is tested and works locally.
- [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L14
[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard/__init__.py#L23
Co-authored-by: Jason Hu <awaregit@gmail.com>
* Use latest client library, evohomeclient v0.3.1
* Fix issue #22097: Failed to call service climate/turn_on...
* BUGFIX: handle case where a Zone doesn't have a temperature
* BUGFIX: missing exception handler, and inappropriate delint hints
* Improve exception handling, and also better messages
* improve code (REDACT secrets); remove TODOs
* minor refactor - improve error message
* more refactoring - improve error message
* remove TODOs
* update to latest evohomeclient library
* Use latest client library, evohomeclient v0.3.1
* Fix issue #22097: Failed to call service climate/turn_on...
* BUGFIX: handle case where a Zone doesn't have a temperature
* BUGFIX: missing exception handler, and inappropriate delint hints
* Improve exception handling, and also better messages
* improve code (REDACT secrets); remove TODOs
* minor refactor - improve error message
* more refactoring - improve error message
* remove TODOs
* update to latest evohomeclient library
* fix requests for houndci-bot
* Tidy up requests exception handling
* Correct lint error
* update to latest client library
* minor de-lint
* more cleanup of exceptions, messages
* refactored for new exception
* fix error in requirements*_all.txt
* de-lint
* delint unused import
* import 3rd-party library only inside methods
* change honeywell tests
* delint, fix typo
* we dont log usernames, passwords, etc.
* de-lint
* initial commit
initial commit
rewrite tests
fix merge issue with fan component
fix merge issue with fan component
* correct line length
* change to sync_setup_component for tests
* rename services and move services.yaml
* move hepa and carbon filter state from sensor to fan
* add test for duplicate entities
* fix method call tests
* fix docstring
* Add select source support
* Review feedback changes
* Removed unused import
* Ignore 'umused' import used in typing
* Only include trace back on useful errors
* Remove return from play_source
* The Great Migration
* removed outdated tests
* Upgraded enturclient to v0.2.0
- client has gone async
- configurable if non boarding departures should be omitted from result
- configurable how many departures should be shown
- more clear which attributes are included and when
* reduced nesting and clearing of attributes
* Removed test data
* ensure attribution and stop id in attributes
* docstring fixes
* fix rebase errors
went a bit too fast on continue on one of the conflicts..
* fix test requirements comment from gen
* Initial draft
* Add tests for init
Fix hound comments
* Add tests for device
Change parameter handling to make device easier to test
* Remove superfluous functionality per Martins request
* Fix hound comments
* Embedded platforms
* Fix device import
* Config flow retry
* Options default values will be set automatically to options in config entry before component can be used
* Clean up init
Add populate options
Fix small issues in config flow
Add tests covering init
* Improve device tests
* Add config flow tests
* Fix hound comments
* Rebase miss
* Initial tests for binary sensors
* Clean up
More binary sensor tests
* Hound comments
* Add camera tests
* Fix initial state of sensors
* Bump dependency to v17
* Fix pylint and flake8
* Fix comments
* Moved climate components with tests into platform dirs.
* Updated tests from climate component.
* Moved binary_sensor components with tests into platform dirs.
* Updated tests from binary_sensor component.
* Moved calendar components with tests into platform dirs.
* Updated tests from calendar component.
* Moved camera components with tests into platform dirs.
* Updated tests from camera component.
* Moved cover components with tests into platform dirs.
* Updated tests from cover component.
* Moved device_tracker components with tests into platform dirs.
* Updated tests from device_tracker component.
* Moved fan components with tests into platform dirs.
* Updated tests from fan component.
* Moved geo_location components with tests into platform dirs.
* Updated tests from geo_location component.
* Moved image_processing components with tests into platform dirs.
* Updated tests from image_processing component.
* Moved light components with tests into platform dirs.
* Updated tests from light component.
* Moved lock components with tests into platform dirs.
* Moved media_player components with tests into platform dirs.
* Updated tests from media_player component.
* Moved scene components with tests into platform dirs.
* Moved sensor components with tests into platform dirs.
* Updated tests from sensor component.
* Moved switch components with tests into platform dirs.
* Updated tests from sensor component.
* Moved vacuum components with tests into platform dirs.
* Updated tests from vacuum component.
* Moved weather components with tests into platform dirs.
* Fixed __init__.py files
* Fixes for stuff moved as part of this branch.
* Fix stuff needed to merge with balloob's branch.
* Formatting issues.
* Missing __init__.py files.
* Fix-ups
* Fixup
* Regenerated requirements.
* Linting errors fixed.
* Fixed more broken tests.
* Missing init files.
* Fix broken tests.
* More broken tests
* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.
* Disabled tests, will remove sensor in #22147
* Updated coverage and codeowners.
* Consolidate
* Fix tests
* Update imports
* Fix import
* Use importlib because integration and package share name
* Fix more tests
* Update .coveragerc and CODEOWNERS
* initial commit of streams
* refactor stream component
* refactor so stream formats are not considered a platform
* initial test and minor refactor
* fix linting
* update requirements
* need av in tests as well
* fix import in class def vs method
* fix travis and docker builds
* address code review comments
* fix logger, add stream start/stop logs, listen to HASS stop
* address additional code review comments
* beef up tests
* fix tests
* fix lint
* add stream_source to onvif camera
* address pr comments
* add keepalive to camera play_stream service
* remove keepalive and move import
* implement registry and have output provider remove itself from stream after idle, set libav log level to error
* Initial pass of a mobile_app component
* Fully support encryption, validation for the webhook payloads, and other general improvements
* Return same format as original API calls
* Minor encryption fixes, logging improvements
* Migrate Owntracks to use the superior PyNaCl instead of libnacl, mark it as a requirement in mobile_app
* Add mobile_app to .coveragerc
* Dont manually b64decode on OT
* Initial requested changes
* Round two of fixes
* Initial mobile_app tests
* Dont allow making registration requests for same/existing device
* Test formatting fixes
* Add mobile_app to default_config
* Add some more keys allowed in registration payloads
* Add support for getting a single device, updating a device, getting all devices. Also change from /api/mobile_app/register to /api/mobile_app/devices
* Change device_id to fingerprint
* Next round of changes
* Add keyword args and pass context on all relevant calls
* Remove SingleDeviceView in favor of webhook type to update registration
* Only allow some properties to be updated on registrations, rename integration_data to app_data
* Add call service test, ensure events actually fire, only run the encryption tests if sodium is installed
* pylint
* Fix OwnTracks test
* Fix iteration of devices and remove device_for_webhook_id
* 🚜 Rewrite of Toon component
* 🔥 Removed manual state from list
* 👕 Addresses code review comments
* 🔥 Removes a log line that should not have been left behind
* 👕 Addresses linting warnings
* 👕 Addresses Hound CI warning
* 👕 Fixes small code styling issues
* ✨ Sets an appropriate SCAN_INTERVAL
* ✨ Sets min/max temperature for climate platform
* 👕 Makes imports more consistent with codebase
* 🚑 Fixes incorrect SCAN_INTERVAL value in climate platform
* 🚑 Uses OrderedDict for config_flow schema
* 👕 Adds return types for min/max temp
* 🚜 Refactors entities into their actual devices
* ⬆️ Updates toonapilib to 3.0.7
* 🚜 Refactors binary sensor state inversion
* 🚑 Fixes states of OpenTherm connection and Hot Tap Water
* ✨ Adds Boiler Preheat binary sensor
* ✨ Adds Toon Thermostat Program binary sensor
* ✨ Adds Boiler Modulation Level sensor
* ✨ Adds Daily Power Cost sensor
* 🔥 Cleanup of Toon Thermostat climate attributes
* 🚜 Adjusts config_flow with Tenant selection
* 🙋 Adds myself to codeowners file as maintainer
* ⬆️ Gen requirements
* ⬆️ Updates toonapilib to 3.0.9
* ☔ Adds config_flow tests
* {switch,light}.tplink: use deviceid as unique id, fetch name from the device during initialization
* raise PlatformNotReady when no device is available
* Use mac instead of deviceid
* remove name option as obsolete
* Add support for configuration flow / integration
Allows activating automatic discovery of supported devices from the configuration
* Fix linting, update requirements_all.txt
* start cleaning up tplink component based on feedback
* add device info, improve config handling
* Allow overriding detected devices via configuration file
* Update requirements.txt
* Remove debug logging
* make hound happy
* Avoid I/O during init and simplify the code, remove remains of leds_on
* Fix issues based on feedback, use consistent quotation marks for device info
* add async_setup_platform emiting a deprecation warning
* Avoid blocking the I/O, check for None on features
* handle some Martin's comments, schema-validation is still missing
* use async_create_task instead of async_add_job, let core validate the schema
* simplify configuration handling by storing the configuration data separately from initialized instances
* add default values to schema, make hound happy
* with defaults set by schema, simplify the checks. add async_unload_entry
* Use constant for data structure access
* REWORD add a short note about async_unload_entry
* handle feedback from Martin, config_data is checked against Noneness
* use pop to remove the domain on unload
* First steps to add tests for the new tplink component
* embed platforms under the component directory
* Fix tests by mocking the pyhs100 internals
* Fix linting
* Test against multiple instances of devices, tidy up
* (hopefully) final linting round
* Add pyHS100 to test requirements
* log always the warnings occured during an update to make them easy to see
* revert back the warning behavior (requirement for silver level in IQS)
* Unload only when an entry is being loaded and add tests for that
Thanks @MartinHjelmare for pointing this out!
* Fix linting
* Bump the upstream lib, fixes most prominently the HSV setting on bulbs
* Test unloading for all platforms, clear the data storage instead of popping it out, making it possible to reconfigure after removal without restarting hass first
* Use class variables instead of instance variables for bulb states, required for HS220
* Use new-style format string
* Fix indenting, uppercase the mock constant
* Run black on test_init, hopefully that will finally fix the weird formatting (pycharm, pylint and hound seems to have different opinions...)
* Add a prompt if bridge update is available.
* Change logger warning for light update
The self.light.swupdatestate only checks for updates of that specific light, it does not check for updates of the bridge.
Theirfore the warning message schould be updated.
* add space
* fix tests
* rename to swupdate2_bridge_state
* update aiohue to v1.9.1
* update aiohue to v1.9.1
* update aiohue to v1.9.1