* Added support for SwitchBot Lock
* Updated PySwitchbot to 0.32.1
* Updated .coveragerc
* Removed unnecessary condition
* Using library method to verify encryption key
* Added config flow tests
* Remove link from config flow description
* Added one more test for config flow
* Updated CODEOWNERS
* Bump pyrainbird to 0.7.0 and move to async library
* Share updates across sensors
* Fix test version and delete dead code
* Add test coverage for yaml configuration
* Address PR feedback
* Copy google_sheets to google_assistant_sdk
This is to improve diff of the next commit with the actual implementation.
Commands used:
cp -r homeassistant/components/google_sheets/ homeassistant/components/google_assistant_sdk/
cp -r tests/components/google_sheets/ tests/components/google_assistant_sdk/
find homeassistant/components/google_assistant_sdk/ tests/components/google_assistant_sdk/ -type f | xargs sed -i \
-e 's@google_sheets@google_assistant_sdk@g' \
-e 's@Google Sheets@Google Assistant SDK@g' \
-e 's@tkdrob@tronikos@g'
* Google Assistant SDK integration
Allows sending commands and broadcast messages to Google Assistant.
* Remove unnecessary async_entry_has_scopes check
* Bump gassist-text to fix protobuf dependency
* Add matter base (#79372)
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
* Add matter server add-on flow (#82698)
* Add matter server add-on flow
* Fix stale error argument
* Clean docstrings
* Use localhost as default address
* Add matter websocket api foundation (#82848)
* Add matter config entry add-on management (#82865)
* Use matter refactored server/client library (#83003)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Bump python-matter-server to 1.0.6 (#83059)
* Extend matter websocket api (#82948)
* Extend matter websocket api
* Finish docstring
* Fix pin type
* Adjust api after new client
* Adjust api to frontend for now
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Added initial files for air-Q integration
* Allow FIXME comments in pylint (temporary)
Also reintroduce --ignore-missing-annotations=y
* Set up air-q entry to connect to aioairq's API (initial attempt)
Also add necessary constants
* Implement a class for sensors and its update logic
Very early stage, WIP
* Zeroconf and authentication are working
* Complete the bare-bone minimal working version
Specifically, make AirQSensor update its values.
* Handle invalid authentication gracefully
* Handle ClientConnectionError gracefully
* Add field hint for the login form
The key in the schema, which defines the form in
`ConfigFlow.async_show_form` is looked up in both `airq/strings/json`
and `airq/translations/en.json`. I am still not 100% sure how this
lookup is performed. WIP
* Minor cleanups
* Extend sensor list to all supported by SensorDeviceClass
Also manage warming up sensors
* aioairq is published to PyPI and mentioned in requirements
* Reordered constants and list content alphabetically
As required by style guides. Also turned SENSOR_TYPES to a list
* Updated file docstrings for a dev unfamiliar w/homeassistant like myself
* Adding a bit of logging for the integration setup process
* Expose scan interval & smoothing flag
Also streamline test_authentication in config_flow.
* Fix a type annotation mistake
* Use as many constants from homeassistant.const as possible
My only concern is using CONST_IP_ADDRESS = "ip_address" for smth which
stands for both IP address and mDNS...
* Temporarily rollback ConfigFlow.async_step_configure and use defaults
TODO: implement OptionFlowHandler instead
* Define custom Coordinator, w subset of airq config
The latter is then accessed from entity / sensor constructors to define
correct DeviceInfo
* Provide translations to de & fr + minor changes to en
* Provide translations to ru + a minor en changes
* Make translation a little more helpful and polite
* Fix devicename and entry title
* Remove stale commented out code
* Test config_flow
At this point two helper functions which interact with the external
library are not tested
* Clean up unrelated and meant as temporary changes
* Clean up unnecessary comments meant for internal use
* Move fetching config to a dedicated async coordinator method
As opposed to it being a potentially poorly justified step in
async_setup_entry
* Remove zeroconf support since it is not yet ready
* Remove translations other than en
* Remove unnecessary comments, manifest.json entries, and constants
* Improve exception handling
- `_LOGGER` uses `debug` and not `error` levels.
- Drop `ClientConnect` and catch `aiohttop.ClientConnectError` directly
- Drop `Exception` as it is not expected from `aioairq` (remove the
corresponding test too)
* Drop strings for obsolete errors and steps
Specifically, `unknown` error isn't caught any more. `configure` step
has also been removed.
* Refactor en.json to be consistent with strings.json
* Move target_route from a coordinator argument to a constant
At this point a user cannot configure the target_route route, thus it
does not make sense to expose it half-heartedly in
`AirQCoordinator.__init__`, since it cannot be accessed.
* Fix an async call in `AirQCoordinator.async_setup_entry`
* Refactor underlying aioairq API
- Use `homeassistant.helpers.aiohttp.async_get_clientsession` and pass a
single persistent session to `aioariq.AirQ.__init__`
- `aioairq.AirQ.fetch_device_info` now returns a `DeviceInfo` object heavily
inspired and almost compatible with `homeassistant.helpers.entity.DeviceInfo`.
Make heavier use of this object and define a single `DeviceInfo` in the
`AirQCoordinator` (instead of recreating the same object for each sensor
of the device in `sensor.AirQSensor`)
- Drop two helper functions in `config_flow.py` and operate on `aioariq.AirQ`
methods directly
* Fix the version of aioairq
* Add 15 more sensors + icons
* Remove cnt* & TypPS, change units of health & performance
* Add 12 more sensors
* Add a missing icon
* Gracefully handle device not being available on setup
If the device and the host are not on the same WiFi,
ServerTimeoutError is raised, which is caught by
ClientConnectionError.
If the device is powered off, ClientConnectionError is expected.
In both cases, ConfigEntryNotReady is raised, as prescribed by the docs.
Newer version of aioairq times-out far quicker than the default 5 mins.
* Rename two sensors
* Validate provided IP address / mDNS
aioairq now raises InvalidInput if provided IP / mDNS does not seem
valid. Handle this exception correctly
* Apply suggestions from code review
Clean up the comments and rename the logger
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>
* Only fetch device info during the first refresh
- Fetched info is stored in AirQCoordinator.device_info.
- In `AirQSensor.native_value` only multiply by the factor if
the sensor reading is not None
- Fix the tests for ConfigFlow for aioairq==0.2.3. Specifically
make the dummy data pass the new validation step upstream
+ add a test which fails it
* Drop custom device classes for now
* Apply suggestions from code review
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>
* Only fetch device info during ConfigFlow.async_step_user
Store the result obtained by `airq.fetch_device_info` it in
`config_entry.data`. Pass the entire config entry to `AirQCoordinator`
and build the entire `homeassistant.helpers.entity.DeviceInfo` in the
`AirQCoordinator.__init__`. This makes
`AirQCoordinator._async_fetch_device_info` and overloaded
`AirQCoordinator._async_config_entry_first_refresh` obsolete.
Bump aioairq version.
Turn update_interval from `AirQCoordinator.__init__` argument into a
contestant.
* Custom entity description exposing a hook to modify sensor value
Use a `AirQEntityDescription` with a callable `value_fn` which allows to
change the sensor value retrieved from the device. Note that the
callable does not handle data retrieval itself (even from
`coordinator.data`). Instead it is purely a hook to transform obtained
value.
* Avoid duplicated use of unique_id
Device info is fetched during the `ConfigFlow.async_user_step`.
`unique_id` is taken from the device info and is **not** stored
in `config_entry.data`. Subsequently `config_entry.unique_id` is
used instead.
* Drop unnecessary try-except
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>
* Clarify the use of value_transform_fn
* Refactor the use of lambdas in AirQEntityDescription
Now it is the job of the callable under `value` to get the sensor
reading from the coordinator's data. Factoring this functionality into a
callback decouples the key of the description from the key of dict,
returned by the API, so `AirQEntityDescription` no longer requires its key
to be set to smth clearly internal (e.g. `nh3_MR100`).
* Use a callback to update native_value
Since all `native_value`s are updated synchronously, it can as well be
done in a callback for better state consistency (right?)
* Revert the description keys to match data keys
Must match given the current way of identifying available sensors. On a
broader scale, they must match to be able to relate the descriptions to
sensors, unless a separate lookup table is maintained.
* Reduce number of loops when adding sensors
Filtering warming up sensors and non-sensor keys can be combined with
adding entities.
* Remove obsolete imports
* Update integrations.json
* Add integration_type
Integration supports multiple devices => hub
Co-authored-by: dl2080 <daniel.lehmann@runbox.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Artem Draft <Drafteed@users.noreply.github.com>
Co-authored-by: Daniel Lehmann <43613560+dl2080@users.noreply.github.com>
Co-authored-by: Martin Selbmann <job@martin-selbmann.de>
* mapping
* update
* working
* tests
* fixes
* temp add binary sensor platform to make sure it works
* fixes
* 100% cover
* adjust
* disable chatty sensors by default
* remove binary sensor_platform for next PR
* time is much nicer than counter
* Bump btsmarthub_devicelist
This PR bumps the btsmarthub_devicelist version to correct an issue
experienced by a recent firmware upgrade to the SmartHub2.
* Bump btsmarthub_devicelist to 0.2.3
This version bump fixes an issue where BT SmartHub2 devices cannot be
correctly autodetected. The current workaround is to specifiy it
manually, which isn't great UX (and did previously work until a recent
firmware upgrade).
I've also taken the opportunity to reassign ownership of the component
to myself as @jxwolstenholme no longer has a SmartHub so cannot do
manual testing and also has no need to use the component anymore.
* Add Config Flow to APCUPSd integration and remove YAML support.
* Hide the binary sensor if user does not select STATFLAG resource.
* Add tests for config flows.
* Simplify config flow code.
* Spell fix.
* Fix pylint warnings.
* Simplify the code for config flow.
* First attempt to implement import flows to suppport legacy YAML configurations.
* Remove unnecessary log calls.
* Wrap synchronous update call with `hass.async_add_executor_job`.
* Import the YAML configurations when sensor platform is set up.
* Move the logger call since the variables are not properly set up.
* Add codeowner.
* Fix name field of manifest.json.
* Fix linting issue.
* Fix incorrect dependency due to incorrect rebase.
* Update codeowner and config flows via hassfest.
* Postpone the deprecation warning to 2022.7.
* Import future annotations for init file.
* Add an newline at the end to make prettier happy.
* Update github id.
* Add type hints for return types of steps in config flow.
* Move the deprecation date for YAML config to 2022.12.
* Update according to reviews.
* Use async_forward_entry_setups.
* Add helper properties to `APCUPSdData` class.
* Add device_info for binary sensor.
* Simplify config flow.
* Remove options flow strings.
* update the tests according to the changes.
* Add `entity_registry_enabled_default` to entities and use imported CONF_RESOURCES to disable entities instead of skipping them.
* Update according to reviews.
* Do not use model of the UPS as the title for the integration.
Instead, simply use "APCUPSd" as the integration title and let the device info serve as title for each device instead.
* Change schema to be a global variable.
* Add more comments.
* Rewrite the tests for config flows.
* Fix enabled_by_default.
* Show friendly titles in the integration.
* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.
* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.
* Update comments in test files.
* Use parametrize instead of manually iterating different test cases.
* Swap the order of the platform constants.
* Avoid using broad exceptions.
* Set up device info via `_attr_device_info`.
* Remove unrelated test in `test_config_flow`.
* Use `DeviceInfo` instead of dict to assign to `_attr_device_info`.
* Add english translation.
* Add `async_create_issue` for deprecated YAML configuration.
* Enable UPS status by default since it could show "online, charging, on battery etc" which is meaningful for all users.
* Apply suggestions from code review
* Apply suggestion
* Apply suggestion
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add nibe local integration
* Add sensor platform
* Enable sensor platform
* Fix manifest
* Correct domain after rename
* Adjust tests for rename
* Correct codeowners
* Add requirements for tests
* Grab coil by name
* Switch to home assistant error
* Config entry always exist
* Switch to create task
* Bump to 0.5.0
* Use new coils access
* Remove unneeded check
* Use single instance of logger
* Test invalid ip
* Don't allow coil to be None
* Remove sleep
* Initialize data in coordinator init
* Add utils to ignore
* Update homeassistant/components/nibe_heatpump/manifest.json
Co-authored-by: J. Nick Koston <nick@koston.org>
* Use generator instead
* Use tenacity as retry decorator
* Use package instead of name to get logger
* Skip broad exception handling
* Catch missing coil exception
* Add missing test
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add SwitchBee Integration
* fixes
* improved API and more logs
* fixed test_config_flow code
* removed light and cover
* Fixed CR comments, updated pylib, improved response time and lowered the scan interval for lower latency
* CR fixes, added advanced setup form to let the
user choose the following:
- scan interval in seconds: default 5
- whether to expose scenarios and group switches from the CU or not
* used SCAN_INTERVAL_SEC instead of typing just the number
* Fixed PR comments, added unit tests
* fixes
* Improved the pypi and updated the code accordingly
* Add SwitchBee Integration
* fixes
* improved API and more logs
* fixed test_config_flow code
* removed light and cover
* Fixed CR comments, updated pylib, improved response time and lowered the scan interval for lower latency
* CR fixes, added advanced setup form to let the
user choose the following:
- scan interval in seconds: default 5
- whether to expose scenarios and group switches from the CU or not
* used SCAN_INTERVAL_SEC instead of typing just the number
* Fixed PR comments, added unit tests
* fixes
* Improved the pypi and updated the code accordingly
* fixes
* restored new line in .coveragerc
* test: increased config_flow test coverage
* removed two way type
* Updated CODEOWNERS
* fix: code review comments
* fixed review comments
* added device_info
* moved device info to attribute
* Initial version of Nobø Ecohub.
* Options update listener for Nobø Ecohub
* Unit test for nobo_hub config flow
* Cleanup
* Moved comment re backwards compatibility
* Improved tests
* Improved tests
* Options flow test
Pylint
* Fix backwards compatibility mode
* Don't require Python 3.9
* Import form configuration.yaml
* Check if device is already configured.
Correct tests for only discovering serial prefix
Fix importing when only serial suffix is configured
* Use constants
* Pylint and variable name clenaup.
* Review
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Fix tests
* Correct disabling off_command and on_commands ("Default" is a hard coded week profile in the hub).
* Improve options dialog
* Configure override type in options dialog
* Formatting
* pyupgrade
* Incorporated review comments
* Incorporated review comments.
* Incorporated second round of review comments.
* Add polling to discover preset change in HVAC_MODE_AUTO.
* Added tests/components/nobo_hub to CODEOWNERS.
* Update homeassistant/components/nobo_hub/config_flow.py
Review
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Update homeassistant/components/nobo_hub/climate.py
Review
Co-authored-by: Allen Porter <allen.porter@gmail.com>
* Simplify if tests.
* Update homeassistant/components/nobo_hub/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/nobo_hub/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Update homeassistant/components/nobo_hub/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Separate config step for manual configuration.
* Fixed indentation
* Made async_set_temperature more robust
* Thermometer supports tenths even though thermostat is in ones.
* Preserve serial suffix in config dialog on error.
* Initial version of Nobø Ecohub.
* Improved tests
* Review
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Configure override type in options dialog
* Separate config step for manual configuration.
* Update homeassistant/components/nobo_hub/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Formatting (prettier)
* Fix HA stop listener.
* Review
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Review
- Removed workaround to support "OFF" setting.
- Simplified config flow to add a new device.
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fixed review comments
* Update en.json with correction in review.
* Implemented review comments:
- Register devices
- Simplifed async_set_temperature
* Register hub as device in init module
* Implemented review comments.
Upgraded pynobo to 1.4.0.
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Avoid tacking on the device name in the entity name
* Inherit entity name from device name
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Allen Porter <allen.porter@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add BThome BLE
* Update BThome to latest version
* 0.3.4
* Rename to bthome 2
* Fix uuids not being found
* Make energy a total increasing state class
* Change unit of measurement of VOC
* Use short identifier
* Fix the reauth flow
* Bump bthome_ble
* Parameterize sensor tests
* Remove Move function to parameter
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* refactor volvooncall to use ConfigFlow
* remove unused constant SIGNAL_STATE_UPDATED
* implemented feedback
* improve ConfigFlow UX by giving an option for region=None
* implemented more feedback
* next round of feedback
* implemented more feedback
* improve test coverage
* more test coverage
* Apply suggestions from code review
* implemented feedback on tests
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add support for USB dongles to the hardware integration
* Update hardware integrations
* Adjust tests
* Add USB discovery for SkyConnect 1.0
* Improve test coverage
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Fix frozen dataclass shizzle
* Adjust test
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Add Landis+Gyr Heat Meter integration
* Add contant for better sensor config
* Add test for init
* Refactor some of the PR suggestions in config_flow
* Apply small fix
* Correct total_increasing to total
* Add test for restore state
* Add MWh entity that can be added as gas on the energy dashoard
* Remove GJ as unit
* Round MWh to 5 iso 3 digits
* Update homeassistant/components/landisgyr_heat_meter/const.py
* Update CODEOWNERS
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add basic tests to the HDMI-CEC component
* Add tests for the HDMI-CEC switch component
* Add test for watchdog code
* Start adding tests for the HDMI-CEC media player platform
Also some cleanup and code move.
* Add more tests for media_player
And cleanup some switch tests.
* Improve xfail message for features
* Align test pyCEC dependency with main dependency
* Make fixtures snake_case
* Cleanup call asserts
* Cleanup service tests
* fix issues with media player tests
* Cleanup MockHDMIDevice class
* Cleanup watchdog tests
* Add myself as code owner for the HDMI-CEC integration
* Fix async fire time changed time jump
* Fix event api sync context
* Delint tests
* Parametrize watchdog test
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add new LaCrosse View integration
* Add new LaCrosse View integration
* Add retry logic
* Actually use the start time for the retry logic
* Get new token after 1 hour
* Replace retry logic with more reliable logic
* Improve test coverage
* Add device info and unique id to config entry
* Fix manufacturer name
* Improve token refresh and check sensor permission
* Improve test cover
* Add LaCrosse View to .strict-typing
* Remove empty fields in manifest.json
* Fix mypy
* Add retry logic for get_data
* Add missing break statement in retry decorator
* Fix requirements
* Finish suggestions by Allen Porter
* Suggestions by Allen Porter
* Fix typing issues with calls to get_locations and get_sensors
* Add Govee BLE integration
* add missing files
* remove test file not needed yet
* fix
* add bbq sensors
* fixed lib
* bump again to fix the names
* fix discovery of the newer bbq devices
* fix the test to test the right thing
* verify no outstanding flows
* only accept entities that match the platform
* refactor
* refactor
* refactor
* Refactor PassiveBluetoothDataUpdateCoordinator to support multiple platforms
* cover
* Update for new model
* Update for new model
* Update tests/components/govee_ble/test_sensor.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* purge dead code
* backmerge from integration
* Update docstring
* Update docstring
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Initial xiaomi_ble integration
* black
* Update homeassistant/components/xiaomi_ble/config_flow.py
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
* Update homeassistant/components/xiaomi_ble/config_flow.py
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
* Apply suggestions from code review
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
* Update tests/components/xiaomi_ble/test_config_flow.py
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
* Update homeassistant/components/xiaomi_ble/sensor.py
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
* Update tests/components/xiaomi_ble/test_config_flow.py
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
* Remove debug code
* Need 'proper' MAC when running tests on linux
* Need to use proper MAC so validation passes
* Add tests for already_in_progress and already_configured
* copy test, add session fixture
* fix test
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Switchbot add support for hygrometers
* Update CODEOWNERS
* Improve debug
* Remove redundant mention to temp unit
* Adopt FlowResultType
* Modify SwitchBot data within coordinator
* Increase logging for switchbot sensor
* Revert "Increase logging for switchbot sensor"
This reverts commit d8b377429c.
Co-authored-by: J. Nick Koston <nick@koston.org>
* Changes accordingly to sidenotes given by @MartinHjelmare in pull #73834.
* Mini version bump according to notes in pull #73834.
* Error message fix, test adjustment.
* Add config flow to AnthemAV integration
* Add importing of existing configuration
* Change setting to optional and add default value
* Use entity attribute
* Reduce changes by removing additional media player properties
* Remove title from translation
* Refactor config flow and fix PR comments
* Fix a failing test because of wrong renaming
* Add typing and use existing class and enum
* Bump dependency to v1.3.1
* Remove unecessary async_reload_entry
* Fix requirements_test_all after rebase
* Add const for timeout and remove async_block in test
* Reapply CodeOwner and configflow after rebase
* Remove name from configflow
* Fix manifest prettier failure
* Simplify code and avoid catching broad exception
* Removed unused strings and translations
* Avoid asserting hass.data
* Convert life360 integration to entity based
* Improve config_flow.py type checking
* Add tests for config flow
Fix form defaults for reauth flow.
* Cover reauth when config entry loaded
* Update per review (except for dataclasses)
* Restore check for missing location information
This is in current code but was accidentally removed in this PR.
* Fix updates from review
* Update tests per review changes
* Change IntegData to a dataclass
* Use dataclasses to represent fetched Life360 data
* Always add extra attributes
* Update per review take 2
* Tweak handling of bad last_seen or location_accuracy
* Fix type of Life360Member.gps_accuracy
* Update per review take 3
* Update .coveragerc
* Parametrize successful reauth flow test
* Fix test coverage failure
* Update per review take 4
* Fix config schema
* Add config flow to eight_sleep
* simplify tests
* Remove extra file
* remove unused import
* fix redundant code
* Update homeassistant/components/eight_sleep/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* incorporate feedback
* Review comments
* remove typing from tests
* Fix based on changes
* Fix requirements
* Remove stale comment
* Fix tests
* Reverse the flow and force the config entry to reconnect
* Review comments
* Abort if import flow fails
* Split import and user logic
* Fix error
Co-authored-by: J. Nick Koston <nick@koston.org>
* fixing after MartinHjelmare review
* fixing after MartinHjelmare review conversion alarm state to hass state
* fixing after MartinHjelmare review conversion alarm state to hass state
* manage the status in the alarm control
* simplyfing return function
* Removing iAlarm XR integration because of Antifurto365 explicit request to remove after some issues in their cloud service
* First version of laundrify integration
* Code cleanup
* Code cleanup after review #2
* Move coordinator to its own file
* Save devices as dict and implement available prop as fn
* Validate token on init, abort if already configured
* Some more cleanup after review
* Add strict type hints
* Minor changes after code review
* Remove OptionsFlow (use default poll interval instead)
* Fix CODEOWNERS to pass hassfest job
* Fix formatting to pass prettier job
* Fix mypy typing error
* Update internal device property after fetching data
* Call parental update handler and remove obsolete code
* Add coordinator tests and fix some config flow tests
* Refactor tests
* Refactor fixtures
* Device unavailable if polling fails
* Adding flow and async
* Fixes to init
* Lint and type
* Fixed coveragerc file
* Added Test Coverage
* Added Update Listener and removed unused code
* Wrong integration name in init.
* Nothing
* Added yaml import flow
* Added YAML import functionality
* Added back aladdin_connect files to coverage rc
* Removed commented code
* Clean up error message
* Update homeassistant/components/aladdin_connect/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/aladdin_connect/__init__.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Update homeassistant/components/aladdin_connect/config_flow.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Updated Documentation errors
* recommended change broke cover.py - backed out
* Cleaned up unused defenitions
* implimented recommended changes from gjohansson
* Dev environment cleanup
* Raised errors for better recovery, replaced removed update files, utilized PLATFORM vars to init platform
* Added back removal
* Added Code Owner
* Fixed more comment errors and import duplicates
* Added test coverage and formated code
* Added test coverage for model and init
* Added test_cover for full testing coverage
* Added await to async call
* Added missing asserts to failure tests
* Updated tranlsation
* Fixed wording in yaml import function, white space in const.py, return from validate_input.
* Update homeassistant/components/aladdin_connect/config_flow.py
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* "too much" whitespace
* Added back mising strings.json errors
* Added ConfigFlowReconfig and tests
* Finished up reauth config flow and associated tests
* Added reauth to strings, removed username from reauth
* recommended changes, ran script.translations, added auth test to reauth
* put back self.entry.data unpack.
* Cleanup for error message, fixed missing "asserts" in tests
* Added yaml import assertions
* Fixed documentation errors in test_cover.
* remove unused string.
* revised tests and wording for yaml import
* Documentation cleanup.
* Changed sideeffect names
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Add ws66i core integration
* Remove all ws66i translations
* Update ws66i unit tests to meet minimum code coverage
* Update ws66i based on @bdraco review
* General improvements after 2nd PR review
* Disable entities if amp shutoff, set default source names, set 30sec polling
* Add _attr_ and change async_on_unload
* Improve entity generation
* Implement coordinator
* Made options fields required, retry connection on failed attempts, use ZoneStatus for attributes
* Refactor WS66i entity properties, raise HomeAssistantError on restore service if no snapshot
* Update to pyws66i v1.1
* Add quality scale of silver to manifest
* Update config_flow test
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Initial developer credentials scaffolding
- Support websocket list/add/delete
- Add developer credentials protocol from yaml config
- Handle OAuth credential registration and de-registration
- Tests for websocket and integration based registration
* Fix pydoc text
* Remove translations and update owners
* Update homeassistant/components/developer_credentials/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/developer_credentials/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Remove _async_get_developer_credential
* Rename to application credentials platform
* Fix race condition and add import support
* Increase code coverage (92%)
* Increase test coverage 93%
* Increase test coverage (94%)
* Increase test coverage (97%)
* Increase test covearge (98%)
* Increase test coverage (99%)
* Increase test coverage (100%)
* Remove http router frozen comment
* Remove auth domain override on import
* Remove debug statement
* Don't import the same client id multiple times
* Add auth dependency for local oauth implementation
* Revert older oauth2 changes from merge
* Update homeassistant/components/application_credentials/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Move config credential import to its own fixture
* Override the mock_application_credentials_integration fixture instead per test
* Update application credentials
* Add dictionary typing
* Use f-strings as per feedback
* Add additional structure needed for an MVP application credential
Add additional structure needed for an MVP, including a target
component Xbox
* Add websocket to list supported integrations for frontend selector
* Application credentials config
* Import xbox credentials
* Remove unnecessary async calls
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update script/hassfest/application_credentials.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Import credentials with a fixed auth domain
Resolve an issue with compatibility of exisiting config entries when importing
client credentials
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Create a new NWS Alerts integration
* Create a new NWS Alerts integration
* Create new PECO integration
* Remove empty keys
* Revert "Create a new NWS Alerts integration"
This reverts commit 38309c5a87.
* Revert "Create a new NWS Alerts integration"
This reverts commit aeabdd37b8.
* Fix test with new mock data
* Add init and sensor to .coveragerc and more tests for config flow
* Small fixes and replacing patch with pytest.raises in testing invalid county
* Add type defs and fix test_config_flow to use MultipleValid instead
* Fix issues with 'typing.Dict'
* Move API communication to seperate PyPI library
* Switch PyPI library from httpx to aiohttp to allow for passing in websessions
* Commit file changes requested by farmio as listed here: d267e4300a
* Add suggestions requested by farmio as listed here: 586d8ffa42
* Move native_unit_of_measurement from prop to attr
* Update PLATFORMS constant type annotation
Co-authored-by: Matthias Alphart <farmio@alphart.net>
* Add peco to .strict-typing
I am from school so I can't run mypy atm
* Forgot to import Final
* Do as requested [here](https://github.com/home-assistant/core/runs/5070634928?check_suite_focus=true)
* Updated mypy.ini, checks should pass now
* Fix to conform to mypy restrictions https://github.com/home-assistant/core/runs/5072861837\?check_suite_focus\=true
* Fix type annotations
* Fix tests
* Use cast in async_update_data
* Add data type to CoordinatorEntity and DataUpdateCoordinator
* More cleanup from suggestions here: https://github.com/home-assistant/core/pull/65194\#pullrequestreview-908183493
* Fix tests for new code
* Cleaning up a speck of dust
* Remove unused variable from the peco sensor
* Add rounding to percentage, and extra clean-up
* Final suggestions from @farmio
* Update SCAN_INTERVAL to be a little bit faster
* Change the SCAN_INTERVAL to be somewhat near the update interval of the outage map, as noted by farmio
* New UpdateCoordinator typing
* Add new tomorrow.io integration to replace Climacell - Part 1/3 (#57121)
* Add new tomorrow.io integration to replace Climacell - Part 1/3
* remove unused code
* remove extra test
* remove more unused code
* Remove even more unused code
* Feedback
* clean up options flow
* clean up options flow
* tweaks and fix tests
* remove device_class from tomorrowio entity description class
* use timestep
* fix tests
* always use default name but add zone name if location is in a zone
* revert change that will go into future PR
* review comments
* move code out of try block
* bump max requests to 500 as per docs
* fix tests
* Add new tomorrow.io integration to replace Climacell - Part 2/3 (#57124)
* Add new tomorrow.io integration to replace Climacell - Part 2/3
* translations
* set config flow to false in manifest
* Cleanup more code and re-add options flow test
* fixes
* patch I/O calls
* Update tests/components/climacell/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* remove unused import
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Fix codeowners
* fix mypy and pylint
* Switch to DeviceInfo
* Fix fixture location and improve sensor entities in tomorrowio integration (#63527)
* Add new tomorrow.io integration to replace Climacell - Part 3/3 (#59698)
* Switch to DeviceInfo
* Add new tomorrow.io integration to replace Climacell - Part 1/3 (#57121)
* Add new tomorrow.io integration to replace Climacell - Part 1/3
* remove unused code
* remove extra test
* remove more unused code
* Remove even more unused code
* Feedback
* clean up options flow
* clean up options flow
* tweaks and fix tests
* remove device_class from tomorrowio entity description class
* use timestep
* fix tests
* always use default name but add zone name if location is in a zone
* revert change that will go into future PR
* review comments
* move code out of try block
* bump max requests to 500 as per docs
* fix tests
* Migrate ClimaCell entries to Tomorrow.io
* tweaks
* pylint
* Apply fix from #60454 to tomorrowio integration
* lint and mypy
* use speed conversion instead of distance conversion
* Use SensorDeviceClass enum
* Use built in conversions and remove unused loggers
* fix requirements
* Update homeassistant/components/tomorrowio/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use constants
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Black
* Update logic and add coverage
* remove extra line
* Do patching correctly
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add configuration option to disable the creation of zone bypass switches
* Removed temporary workaround and bumped pyenvisalink version to pick up the correct fix.
* Remove zone bypass configuration option and disable zone bypass switches per code review instructions.
* Add Moehlenhoff Alpha2 underfloor heating system integration
* isort changes
* flake8 changes
* Do not exclude config_flow.py
* pylint changes
* Add config_flow test
* correct requirements_test_all.txt
* more tests
* Update test description
* Test connection and catch TimeoutError in async_setup_entry
* Add version to manifest file
* Remove version from manifest file
* Replace tests.async_mock.patch by unittest.mock.patch
* Update moehlenhoff-alpha2 to version 1.0.1
* Update requirements for moehlenhoff-alpha2 1.0.1
* Update moehlenhoff-alpha2 to 1.0.2
* Use async_setup_platforms
* Use async_unload_platforms
* Separate connection and devices for each entry_id
* Use async_track_time_interval to schedule updates
* Check if input is valid before checking uniqueness
* Move Exception handling to validate_input
* Catch aiohttp.client_exceptions.ClientConnectorError
* Remove translation files
* Mock TimeoutError
* Fix data update
* Replace current callback implementation with ha dispatcher
* Return False in should_poll
* Remove unused argument
* Remove CONNECTION_CLASS
* Use _async_current_entries
* Call async_schedule_update_ha_state after data update
* Remove unneeded async_setup
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Remove unneeded async_setup_platform
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Set Schema attribute host required
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Remove unused Exception class
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Update manifest.json
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* pylint constructor return type None
* Replace properties by class variables
* use pass instead of return
* Remove unused sync update method
* remove property hvac_action
* remove pass
* rework exception handling
* Update homeassistant/components/moehlenhoff_alpha2/config_flow.py
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Correct indentation
* catch Exception in validate_input
* Replace HomeAssistantType with HomeAssistant
* Update to moehlenhoff-alpha2 1.0.3
* Allow to switch between heating and cooling mode
* Update moehlenhoff-alpha2 to version 1.0.4
* Update heatarea data after setting target temperature
* Support hvac_action
* Fix heatarea update with multiple bases
* Update data after setting preset mode
* Use custom preset modes like defined by device
* Fix config flow test
* Fix test_duplicate_error
* Rename property to extra_state_attributes
Rename property device_state_attributes to extra_state_attributes and
return lowercase keys in dict.
* Refactor using DataUpdateCoordinator
* Remove _attr_should_poll
* Raise HomeAssistantError on communication error
Catch HTTPError instead of broad except and reraise as HomeAssistantError
* Change DataUpdateCoordinator name to alpha2_base
* Refresh coordinator before setting data
* Raise ValueError on invalid heat area mode
* Rename heatarea to heat_area
* Set type annotation in class attribute
* Move coordinator to top
* Move exception handling to the coordinator
* Use heat_area_id directly
* Sore get_cooling() result into local var
* Add explanation of status attributes
and remove BLOCK_HC
* Fix pylint warnings
* from __future__ import annotations
* Use Platform Enum
* Move data handling to coordinator
* Remove property extra_state_attributes
* Add missing annotations
* Update moehlenhoff-alpha2 to version 1.1.2
* Rework tests based on the scaffold template
* Set also heat/cool/day/night temp with target temp
* Remove unneeded code from tests
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
* Initial fivem integration setup
* Use licenseKey for unique ID
* Create FiveMServer class
* Create FiveMStatusBinarySensor
* Fix platform loading
* Create sensor platform
* Remove config flow tests
* Update manifest.json
* Use attr_ instead or properties in sensors.py
* Use entry_id as unique_id
* Move device info to _attr instead of property
* Register callback in FiveMEntity
* Create config flow tests
* Add loggin to fivem
* Use FiveM in config_flow
* Use update_coordinator instead of dispatcher
* Bump fivem-api to 0.1.2
* Remove leftovers
* More tests for config flow
* Add component files to .coveragerc
* Fix simple comments
* Add gamename check to config flow
* Use entity descriptions for sensors
* Move extra attributes to init
* Use [] instead of get() for server info
* Fix error in gamename test
* Add initial version of the webrtc integration
Add the webrtc integration. This integration proxies the
signal 'offer' from the client to a RTSPtoWebRTCP server that
returns an 'answer'.
The RTSPtoWebRTC server is a go binary based on pion, and this is
what is currently used by the WebRTC custom_component:
https://github.com/AlexxIT/WebRTChttps://github.com/deepch/RTSPtoWebRTC
* Readability improvements for webrtc
* Reach 100% test coverage
* Use rtsp-to-webrtc client library package
* Rename webrtc to rtstptowebrtc
This is to reflect naming as one type of approach to webrtc since other webrtc integrations would look very different.
* Remove internal quality scale
* Bump rtsptowebrtc to support heartbeats
* Shorten server url variable and remove const.py
* Add config flow validation for RTSPtoWebRTC server
* Add RTSPtoWebRTC server health checks
* Accept translation suggestion
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update rtsptowebrtc to use new camera registry API
Update rtsptowebrtc to use new API added in #62962
* Remove unused variable
* Fix lint and typing errors for python 3.8
* Rename to rtsp_to_webrtc to follow standards
* Use async_on_unload for unsubscribing camera webrtc provider
* Remove unnecessary translations in config flow
* Remove unnecessary configuration setup
* Cleanup test setup and typing
* Patch integration setup to avoid starting the whole integration
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add input_button
* Update homeassistant/components/input_button/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Improve test coverage
* Add reload test: not affecting state
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add Tailscale integration
* Use DeviceEntryType
* Fix tests
* Adjust to new Pylint version
* Use enums for device classes
* Update homeassistant/components/tailscale/config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Pass empty string as default
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add unique_id and use DataUpdateCoordinator in Fronius (#57879)
* initial refactoring commit - meters
- config_flow (no strings, no tests yet)
- import yaml config
- FroniusSolarNet class for holding Fronius object , coordinators and some common data
- meter descriptions
- update coordinator
- entities (including devices)
* storage controllers
* error handling on init; inverter unique_id
* inverters
* power_flow
* fix VA, var, varh not valid for device_class power/energy
and add custom icons
* add SolarNet device for system wide values
* cleanup
* config_flow strings
* test config_flow
* use pyfronius 0.7.0
* enable strict typing
* remove TODO comments
* fix lint errors; move FroniusSensorEntity to sensor.py
* power_flow as optional coordinator
API V0 doesn't support power_flow endpoint
* show error message in logs
* prevent parallel requests to one host
* logger_info coordinator
* store FroniusSolarNet reference directly in coordinator
* cleanup coordinators when unloading entry
* round floats returned by Fronius API
* default icons for grid im/export tariffs
* small typing fix
* Update homeassistant/components/fronius/sensor.py
Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>
* DC icons
* prepend names with "Fronius" and device type
to get more reasonable default entity_ids (eg. have them next to each other when alphabetically sorted)
* remove config_flow and devices
* rename _FroniusUpdateCoordinator to FroniusCoordinatorBase
and mark ABC
* move SensorEntityDescriptions to sensor.py
* Revert "move SensorEntityDescriptions to sensor.py"
This reverts commit 2e5a726eb6.
* Don't raise ConfigEntryNotReady and use regular refresh method
* move bridge initialization out of helper class
* no coverage tests
* power_flow update interval 10 seconds
* move SensorEntityDescriptions to sensor.py
without introducing a circular dependency
* deprecation warning for CONF_MONITORED_CONDITIONS
* remove extra_state_attributes form meter sensor entities
* readd diagnostic entities
* decouple default entity_id from default name
* use key instead of name for entity_id
and make deprecated config key optional
* adjust tests
* use old entity_ids
these changes are now backwards compatible
* check coverage
* simplify entity description definitions
* restore entity names of previous implementation
Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>
* Add config_flow for Fronius integration (#59677)
* Cleanup Fronius config_flow and tests (#60094)
* Add devices to Fronius integration (#60104)
* New entity names for Fronius entities (#60215)
* Adaptive update interval for Fronius coordinators (#60192)
Co-authored-by: Brett Adams <Bre77@users.noreply.github.com>
* 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>
* Switch to UpdateCoordinator for eight sleep
* use super call
* add self as codeowner
* Call API update method directly when creating coordinator
* Update homeassistant/components/eight_sleep/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/eight_sleep/__init__.py
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add config_flow to Environment Canada
* Add unique_id
* Remove erroneous directory.
* Tests working!!
* Add back setup.
* First cut of import.
* Temp
* Tweak names.
* Import config.yaml.
* Clean up imports.
* Import working! Some refactor to clean it up.
* Add import test.
* Small optimization.
* Fix comments from code review.
* Remove CONF_NAME and config_flow for it.
* Fixup strings to match new config_flow.
* Fixes for comments from last review.
* Update tests to match new import code.
* Clean up use of CONF_TITLE; fix lint error on push.
* Phew. More cleanup on import. Really streamlined now!
* Update tests.
* Fix lint error.
* Fix lint error, try 2.
* Revert unique_id to use location as part of ID.
* Fix code review comments.
* Fix review comments.
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* added keyboard event type to keyboard_remote
* fix emulated hold event
* Update homeassistant/components/keyboard_remote/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* removed event value
* set key_hold to use string constant
* don't use dict.get() for keyboard event type
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add Amber Electric integration
* Linting
* Fixing some type hinting
* Adding docstrings
* Removing files that shouldn't have been changed
* Splitting out test helpers
* Testing the price sensor
* Testing Controlled load and feed in channels
* Refactoring mocks
* switching state for native_value and unit_of_measurement for native_unit_of_measurement
* Fixing docstrings
* Fixing requiremennts_all.txt
* isort fixes
* Fixing pylint errors
* Omitting __init__.py from test coverage
* Add missing config_flow tests
* Adding more sensor tests
* Applying suggested changes to __init.py__
* Refactor coordinator to return the data object with all of the relevent data already setup
* Another coordinator refactor - Better use the dictionary for when we build the sensors
* Removing first function
* Refactoring sensor files to use entity descriptions, remove factory
* Rounding renewable percentage, return icons correctly
* Cleaning up translation strings
* Fixing relative path, removing TODO
* Coordintator tests now accept new (more accurate) fixtures
* Using a description placeholder
* Putting missing translations strings back in
* tighten up the no site error logic - self._site_id should never be None at the point of loading async_step_site
* Removing DEVICE_CLASS, replacing the units with AUD/kWh
* Settings _attr_unique_id
* Removing icon function (it's already the default)
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Adding strings.json
* Tighter wrapping for try/except
* Generating translations
* Removing update_method - not needed as it's being overriden
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Fixing tests
* Add missing description placeholder
* Fix warning
* changing name from update to update_data to match async_update_data
* renaming [async_]update_data => [async_]update_price_data to avoid confusion
* Creating too man renewable sensors
* Override update method
* Coordinator tests use _async_update_data
* Using $/kWh as the units
* Using isinstance instead of __class__ test. Removing a zero len check
* Asserting self._sites in second step
* Linting
* Remove useless tests
Co-authored-by: jan iversen <jancasacondor@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Modernize dlna_dmr component: configflow, test, types
* Support config-flow with ssdp discovery
* Add unit tests
* Enforce strict typing
* Gracefully handle network devices (dis)appearing
* Fix Aiohttp mock response headers type to match actual response class
* Fixes from code review
* Fixes from code review
* Import device config in flow if unavailable at hass start
* Support SSDP advertisements
* Ignore bad BOOTID, fix ssdp:byebye handling
* Only listen for events on interface connected to device
* Release all listeners when entities are removed
* Warn about deprecated dlna_dmr configuration
* Use sublogger for dlna_dmr.config_flow for easier filtering
* Tests for dlna_dmr.data module
* Rewrite DMR tests for HA style
* Fix DMR strings: "Digital Media *Renderer*"
* Update DMR entity state and device info when changed
* Replace deprecated async_upnp_client State with TransportState
* supported_features are dynamic, based on current device state
* Cleanup fully when subscription fails
* Log warnings when device connection fails unexpectedly
* Set PARALLEL_UPDATES to unlimited
* Fix spelling
* Fixes from code review
* Simplify has & can checks to just can, which includes has
* Treat transitioning state as playing (not idle) to reduce UI jerking
* Test if device is usable
* Handle ssdp:update messages properly
* Fix _remove_ssdp_callbacks being shared by all DlnaDmrEntity instances
* Fix tests for transitioning state
* Mock DmrDevice.is_profile_device (added to support embedded devices)
* Use ST & NT SSDP headers to find DMR devices, not deviceType
The deviceType is extracted from the device's description XML, and will not
be what we want when dealing with embedded devices.
* Use UDN from SSDP headers, not device description, as unique_id
The SSDP headers have the UDN of the embedded device that we're interested
in, whereas the device description (`ATTR_UPNP_UDN`) field will always be
for the root device.
* Fix DMR string English localization
* Test config flow with UDN from SSDP headers
* Bump async-upnp-client==0.22.1, fix flake8 error
* fix test for remapping
* DMR HA Device connections based on root and embedded UDN
* DmrDevice's UpnpDevice is now named profile_device
* Use device type from SSDP headers, not device description
* Mark dlna_dmr constants as Final
* Use embedded device UDN and type for unique ID when connected via URL
* More informative connection error messages
* Also match SSDP messages on NT headers
The NT header is to ssdp:alive messages what ST is to M-SEARCH responses.
* Bump async-upnp-client==0.22.2
* fix merge
* Bump async-upnp-client==0.22.3
Co-authored-by: Steven Looman <steven.looman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>