* Add support for grouping HEOS media players
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
* Handle groups at controller level, refine tests.
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
* Fix linting issues
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/heos/media_player.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Rename variables and improve resolving of entity_ids
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Don't patch internal methods
Use the pytest fixtures which have already been defined for this.
* Fix linting issues
* Remove unused property
* Ignore groups with unknown leader
This makes sure that the group_members attribute won't contain a `None`
value as a leader entity_id.
* Don't call force_update_groups() from tests
* Don't pass `None` player ids to HEOS API
* Use signal for group manager communication
* Use imports for async_dispatcher_send/async_dispatcher_connect
* Raise exception when leader/player could not be resolved
* Disconnect signal handlers, avoid calling async_update_groups too early
* Update homeassistant/components/heos/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Andrew Sayre (he/his/him) <6730289+andrewsayre@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add accumulated precipitation to unit system
* Fix template test
* Fix typo of testing pressure instead of precipitation
* Add extra arguments so unit system test passes
* Add apparent_power for ZHA ElectricalMeasurement
* Add apparent_power to REPORT_CONFIG
* update device list with apparent_power attribute
* update test decorators for apparent_power
* remove comments
* Add test for apparent_power in test_sensor
* implemented config_flow and dataupdatecoordinator
* implemented config flow, dataupdatecoordinator and tests.
* undid extra vscode task
* fixed pylint errors
* updates based on review
* fix mypy in reauth
* fast interval to 5 sec
* fixed test patches and others from review
* added released package
* deleted wrong line from coveragerc
* updates to config and tests
* fixed test patch
* Make statistics state characteristic selectable
* Move computation in helper function
* Add relevant config elements for clarity
* Rename variables for better readability
* Avoid reserved prefix ATTR_ for stats
* Fix NoneType base_unit error
* Add testcases for statistics characteristic
* Add testcases for state_class, unitless, and characteristics
* Add testcase coverage for no unit with binary
* Replace error catching by an exception
* Attend to review comments
* 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