* calculate brightness from color; scale color
* fix merge
* fix sending color only for brightness independent rgb color
* fix tests for rgb and rgbw color
* use public match_max_scale
* update total_connect_client to 2021.10
* update for total_connect_client changes
* remove unused return value
* bump total_connect_client to 2021.11.1
* bump total_connect_client to 2021.11.2
* Move to public ResultCode
* load locations to prevent 'unknown error occurred'
* add test for zero locations
* put error message in strings
* test for abort and message from strings
* handle AuthenticationError in step_user
* update tests with exceptions
* update reauth with exceptions
* use try except else per suggestion
* only create schema if necessary
* catch auth error in async_setup_entry
* one more fix in test_init
* Add Reauth flow to Wallbox integration
* Review comments processed
* Fixed tests
* Added test for reauth invalid
* Commit to compensate for timedrift, show changes
Compensating for timedrift in my devcontainer,
making a new commit with the right date/time. Requested changes
were done in a previous commit.
* remove reauth schema
* Update homeassistant/components/wallbox/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Pre-factor nest subscriber to library
Move the nest subscriber to a library that can be reused in a future PR:
- From ConfigFlow for creating subscriptions
- On nest removal to delete subscriptions
This is pulled out of PR #59260 to make that easier to review.
* Resolve pylint error in nest api subscriber
* Remove duplicate constants
* Refactor nest ConfigEntry creation in tests into a helper
This is pulled out of PR#59260 to make that overall diff smaller.
* Add typing consistently on new functions
* Fix vis and IAD for DS2438
* Fix IAD and vis for DS2438
* Fix IAD and vis for DS2438
* Fix IAD and vis for DS2438
* Fix IAD and vis for DS2438
* Fix IAD and vis for DS2438
* Fix IAD and vis for DS2438
* Fix IAD and vis for DS2438
* Fix IAD and vis for DS2438
* Initial commit after scaffold setup
* Add initial config flow
* Create initial entity
* Ready for testing
* Can browse, no result yet
* Further improvements. Browsing is working.
Now need to work on proper stream URL
* Two valid URLs. Do not play in HA
* First working version for music
* Add thumbnail
* Includes Artist->Album hierarchy
* Add sorting of artists, albums and tracks
* Remove code for video libraries
* Improved code styling
* Optimize configuration flow
* Fix unit tests for config flow
* Fix import order
* Conform to style requirements
* Use empty string as media type for non playables
* 100% code coverage config_flow
* Type async_get_media_source
* Final docsctring fix after rebase
* Add __init__ and media_source files to .coveragerc
* Fix testing issues after rebase
* Fix string format issues and relative const import
* Remove unused manifest entries
* Raise ConfigEntry exceptions, not log errors
* Upgrade dependency to avoid WARNING on startup
* Change to builtin tuple and list (deprecation)
* Log broad exceptions
* Add strict typing
* Further type fixes after rebase
* Retry when cannot connect, otherwise fail setup
* Remove unused CONFIG_SCHEMA
* Enable strict typing checks
* FlowResultDict -> FlowResult
* Code quality improvements
* Resolve mypy.ini merge conflict
* Use unique userid generated by Jellyfin
* Update homeassistant/components/jellyfin/config_flow.py
Remove connection class from config flow
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Minor changes for additional checks after rebase
* Remove title from string and translations
* Changes wrt review
* Fixes based on rebase and review suggestions
* Move client initialization to separate file
* Remove persistent_notification, add test const.py
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Bring greeneye_monitor to 99% coverage.
* Pass monitor into listeners on Monitors
* Updates for changes in `dev`, create mock monitor
* Remove logging left in after debugging
* Remove xfails now that #58764 has merged
* add button platform
* default values for payload and payload_length
* allow `type` configuration for encoded payloads
* add test for type configuration
* move common constants to const.py
- CONF_PAYLOAD
- CONF_PAYLOAD_LENGTH
* validate payload for payload_length or type
* c&p errors
* fix unique_id and pylint
* fix validator
* Add support for PRESSURE_CBAR (centibars). This is the standard UOM for tensiometers.
While the data could be converted into something like MBAR, and displayed
like that, the correct UOM for this type of sensor is CBAR. Displaying
it as MBAR would be the same as displaying air pressure as feet of Hg, while
technically correct, it's hard to understand when reading.
Adding support for this UOM will fix errors in the UI(statistics) about the unit not
matching a unit of the device_class.
* Add tests for PRESSURE_CBAR
* Change existing toggle to add new function
* Fixed using old property method to using actual protected variable.
* Adding service tests to new cover toggle function
* Working on comments from Pull Request 59233
* Adjust existing tests to fit new fake cover setup
* MockCover is calling state method of MockEntity but should call it from CoverEntity
* using different entity to get back test coverage
* Mark octoprint temperature sensors as unavaible when value is not supplied
* Check for none explictly
* Do not mark the entity as unavailable
* Swap to using er.get_async
* Add speed conversion function
* Add test for speed utility functions
* Update unit system tests
* Fix incorrect unit conversions in tests
* Fix some test errors
* Calculate speed units from smaller set of constants
* Fix typo in speed test
* Use pytest.approx for checking floating point values
* Change other instance of speeds needing to be pytest.approx
* Revert changes to unit system
* Fix oopsie in defining in/day and in/hr
* Parametrize test
* Add comments describing calculations & remove duplicate test
* Fix statistics precision error when configured 0, fix#42547
* Add tests for statistics precision
* Apply precision=0 logic to float numbers only
* Implement contextlib way of exception handling
* Catch statistics startup error for None value states, fix#49254
* Add test for statistics None handling
* Update tests/components/statistics/test_sensor.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Switch test case logic to remove sensor last
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fetch flux_led effects from library
- Each model can have different effects
* Improve support for flux_led pixel/RBM controllers
- RBM effects 1-100 are now available
* empty
* update total_connect_client to 2021.10
* update for total_connect_client changes
* remove unused return value
* bump total_connect_client to 2021.11.1
* bump total_connect_client to 2021.11.2
* Move to public ResultCode
* load locations to prevent 'unknown error occurred'
* add test for zero locations
* Revert "load locations to prevent 'unknown error occurred'"
This reverts commit 28b8984be5.
* Revert "add test for zero locations"
This reverts commit 77bf7908d5.
* convert signal messenger unittest to pytest
* more fixtures
* more assertions and fixed test attachment sending
* reverted unrelated changes
* fixed flake errors
* Flake8 related issues fixed
* HHTPStatus instead of int
* tests for a Symo inverter system
* update testing requirement
* add tests for energy meter data
* move response JSONs to fixture directory
* add storage system response
* review suggestion
* Add binary_sensor to venstar to track alerts
* Add binary_sensor.py to coveragerc
* Apply suggestions from code review by alengwenus
Co-authored-by: Andre Lengwenus <alengwenus@gmail.com>
* Fixup black any mypy complaints
* Yank the typing, it makes everything complain
Co-authored-by: Andre Lengwenus <alengwenus@gmail.com>
* Add support for Installed Auth authentication flows.
Add support for additional credential types to make configuration simpler for
end users. The existing Web App auth flow requires users to configure
redirect urls with Google that has a very high security bar: requires ssl,
and a publicly resolvable dns name.
The new Installed App flow requires the user to copy/paste an access code
and is the same flow used by the `google` calendar integration. This also
allows us to let users create one authentication credential to use with
multiple google integrations.
* Remove hard migration for nest config entries, using soft migration
* Add comment explaining soft migration
* Revet changes to common.py made obsolete by removing migration
* Reduce unnecessary diffs in nest common.py
* Update config entries using library method
* Run `python3 -m script.translations develop`
* Revert nest auth domain
* Remove compat function which is no longer needed
* Remove stale nest comment
* Adjust typing for python3.8
* Address PR feedback for nest auth revamp
* Fail deprecated options
* new removed validator
* correct module_name - add tests
* Add test cant find module cv.removed
* module name from stack+1
* Remove error from log. Just throw.
* assert on thrown exception text
* cleanup formatting remove KeyStyleAdapter
* format the replacement_key and update test
* deprecated vs removed - add raise_if_present opt
* doc string update
* is deprecated
* Add type hints.
* Refactor AuroraDevice to AuroraDeviceEntity
* Refactor AuroraDevice to AuroraDeviceEntity
* Connection class is defined in manifest.
* Separate words with underscore in variable names
* Remove duplicated code.
* Remove unused "unknown" string
* Test import yaml when integration already setup
* Remove test already done in config_flow test
* Convert variable names to snake case
* Shorten AuroraDeviceEntity to AuroraEntity
* Add typing
* Remove unnecessary integration setup in test.
* Refactor "already_setup" to "already_configured"
* Use common string
* Reduce the amount of code in the try block.
* Fix merge
* Allow yaml setup to be deferred if no comms
* Properly setup all sensors for defered yaml setup.
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add type hints.
* Refactor AuroraDevice to AuroraDeviceEntity
* Refactor AuroraDevice to AuroraDeviceEntity
* Connection class is defined in manifest.
* Separate words with underscore in variable names
* Remove duplicated code.
* Remove unused "unknown" string
* Test import yaml when integration already setup
* Remove test already done in config_flow test
* Convert variable names to snake case
* Shorten AuroraDeviceEntity to AuroraEntity
* Add typing
* Remove unnecessary integration setup in test.
* Refactor "already_setup" to "already_configured"
* Use common string
* Reduce the amount of code in the try block.
* Allow yaml setup to be deferred if no comms
* Properly setup all sensors for defered yaml setup.
* Code review: move line out of try block.
* Improve test coverage
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Defer unique_id assignment during yaml import if dark
* Back out variable name change to simplify.
* Allow config flow yaml setup deferral.
* Fix deferred yaml import
* Code review: only wrap necessary lines in try blk
* Code review: catch possible duplicate unique_id
* Simplify assignment.
* Code review: use timedelta to retry yaml import
* Code review: if a different error occurs, raise it
* Remove current config entry if duplicate unique_id
* Code review: remove unnecessary line.
* Code review: revert change, leave to other PR.
* Code review: remove unnecessary patch & min->sec
* Remove unnecessary else after raise.
* Increase test coverage.
* Check the number of config entries at each stage
* Raise ConfigEntryNotReady when connection fails.
* Log & return false for error on yaml import
* Better tests
* Fix find_next_time_expression_time
* Add tests for Nov 7th 2021, Chicago transtion
* Update event tests
* Update test_event.py
* small performance improvement
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* add configuration url
* extend data update coordinator
* improve exception handling during data update
* store coordinator after first refresh
* fix light init
* Allow configuration_url to be removed from device registry
* Add test
* Check for None before stringifying and url parsing
* Add type to dict to remove mypy error on assigning None
* Add kWh as cost option for GAS
* Add kWh as cost option for GAS (pylint)
* Add kWh as cost option for GAS (make CONST)
* Change GAS_UNITS to VALID_ENERGY_UNITS
* Add test for Gas cost in kWh (2)
* Back off ENERGY_WATT_HOUR - unlikely for gas
* Add MEGA_WATT_HOUR support (2)
* Normalise pricing for MEGA_WATT_HOUR
* Normalise pricing for MEGA_WATT_HOUR
* Allow panel prefix for device info configuration url
* Add to add-ons
* Use homeassistant as the prefix
* Update homeassistant/components/hassio/__init__.py
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add all kraken entities on startup
* Add _async_add_kraken_sensors
* Add test sensors available after restart
* Add test for config update
* Update tests/components/kraken/test_sensor.py
Co-authored-by: Allen Porter <allen.porter@gmail.com>
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Fix EXT-X-PROGRAM-DATE-TIME in stream
* Update fragment duration comments in worker
* Update duration test in worker
* Augment test on low latency playlists
* Reset start_time on discontinuity
* Add unique ids to yandex_transport entities
* Add support for railway routes to yandex_transport component
* Test suburban timetable parsed correctly
* Remove redundant default value
* Make unique_id unique and stable
* Remove unique_id from yandex_transport component
Yandex recently switched to the new captcha page and the new version of aiomaps supports it.
The check for captcha is moved to platform setup.
Fixes#56035
Fix a bug where a constant configuration variable in the common test library
is modified during the test, causing side effects for other tests.
This was found by renaming the tests, which caused other tests to fail.
* Change precision of Nest sensors
* Add comment to temp rounding
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Update rounding and tests
* Add test for rounding
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* speed_step must be an integer and a divider of 100
* use percentage_step in tests to test patch
* test with not supported percentage_step
* undo change in test_capabilities
* Use a default precision of one not percentage_step
* typo 2
* Update tests/components/alexa/test_smart_home.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/alexa/capabilities.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* First working draft of number platform
* Replace duration with delay for Hue motion sensors
Improve tests
* Bump dependency to v85
* Use constant for entity category
* Use type rather than using __class__
* Fix unique ID
* Store automation and script traces
* Pylint
* Deduplicate code
* Fix issues when no stored traces are available
* Store serialized data for restored traces
* Update WS API
* Update test
* Restore context
* Improve tests
* Add new test files
* Rename restore_traces to async_restore_traces
* Refactor trace.websocket_api
* Defer loading stored traces
* Lint
* Revert refactoring which is no longer needed
* Correct order when restoring traces
* Apply suggestion from code review
* Improve test coverage
* Apply suggestions from code review
* Add support for daily and monthly statistics
* Remove debug code
* Format code
* Don't use dateutil package
* Remove 2 TODOs
* Remove TODO
* Add comments
Camera devices may support multiple stream sources so we want to clarify that
this is meant to decide which stream source is used in the frontend only.
Will set stream_type temporarily to allow rollout without breaking nightly,
and this will be removed after frontend is updated.