* 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
* 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>
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>
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>
* Remove broken Arlo component
This component has been fully broken since early 2019 because of
authentication changes from Arlo.
* Update requirements
* Full test coverage for KNX integration
* Allow for 0 values, since we all live at those kind of areas in the world
* Remove unneeded method
* Add missing test for climate mode
* Cleanup test and remove fixture that was used only once
* Drop unused init method
* Add type hints to media_player tests
* Adjust test_init
* Adjust media_player
* Add type hints to conftest
* Use Mock in test_media_player
* Use lowercase in test_init
* Use relative import in diagnostics
* Add type hints to config_flow
* Adjust coveragerc
* Make gethostbyname autouse
* Cleanup gethostbyname and remote fixtures
* Drop unused fixtures
* Undo type hints and usefixtures on media_player
* Undo type hints and usefixtures in test_init
* Undo type hints in conftest
* Undo usefixtures in test_config_flow
* Format
Co-authored-by: epenet <epenet@users.noreply.github.com>
* Add diagnostics for philips_js
* Update homeassistant/components/philips_js/diagnostics.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/philips_js/diagnostics.py
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Also redact username/password
They are really not that secret, but seem logical.
* Redact unique id
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* 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
* Improve google calendar test coverage to 97%
* Remove commented out code.
* Remove unnecessary (flaky) checks for token file persistence
* Remove mock code assertions
* Add debug logging to google calendar integration
* Increase alarm time to polling code to reduce flakes
* Setup every test in their own configuration directory
* Mock out filesystem calls to avoid disk dependencies
Update scope checking code to use Storage object rather than text file matching
* Update tests to check entity states when integration is loaded
* Mock out google service in multiple locations
* Update homeassistant/components/google/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/google/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Introduce number platform for Shelly
* coverage
* Rework based on review comment
* Improve logic around channel
* Remove unused value
* rebase
* Removed redundant properties
* Update homeassistant/components/shelly/number.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Remove channel workaround as currently not needed
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Add webOS Smart TV config flow support (#53256)
* Add Webostv config flow
* Fix tests mocks and apply review comments
* Apply review comments
* Change config flow to use ssdp UDN as unique_id
* Fix device info
* More review comments
* Fix _async_check_configured_entry
* Remove turn on script
* Add webOS Smart TV device triggers (#53752)
* Add webOS Smart TV config flow support (#53256)
* Add Webostv config flow
* Fix tests mocks and apply review comments
* Apply review comments
* Change config flow to use ssdp UDN as unique_id
* Fix device info
* More review comments
* Fix _async_check_configured_entry
* Remove turn on script
* Add webOS Smart TV device triggers (#53752)
* Fix webOS Smart TV mypy and pylint errors (#62620)
* Change webOS Smart TV PyPi aiopylgtv package to bscpylgtv (#62633)
* Change webOS Smart TV PyPi aiopylgtv package to bscpylgtv
* Update bscpylgtv to 0.2.8 (revised websockets requirment)
* Change webOS Smart TV PyPi package to aiowebostv (#63759)
* Change webOS Smart TV PyPi package to aiowebostv
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* webOS TV check UUID for user added device (#63817)
* webOS TV check uuid when for user added device
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add test for form abort and host update
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Rework webOS Smart TV device trigger to custom trigger platform (#63950)
* Rework webOS Smart TV device trigger to custom trigger platform
* Review comments and add tests
* Fix webOS TV import from YAML (#63996)
* Fix webOS TV import from YAML
* Fix requirements
* Migrate YAML entities unique id to UUID
* Add backoff to migration task delay
* Assert result data and unique_id
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add codeowner
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add buttons to opt into/out of the next Ridwell pickup
* Buttons finished
* Coverage
* better name
* Move to switch
* Clean up
* Coverage
* Use correct exception
* Removed prometheus from .coveragerc
* Update prometheus tests with handler categories
* Updated prometheus metrics to use the current registry
- don't use the registry created on import (needed for tests)
* Reset the prometheus CollectorRegistry before every test
* Update prometheus metrics generation
- Use latest registry when generating a response
* Add default collectors when resetting the registry
* Move entities to the specific prometheus test case
* Refactor body generation for prometheus tests
* Add test case for sensors without unit after rebase
* Fix prometheus tests
- Wait for events in prometheus tests
- Add workaround for demo platform dependecy conversation (aiohttp frozen router)
* Added prometheus tests for attribute metrics
* Added prometheus tests for binary_sensor
* Add prometheus test for input_boolean
* Add prometheus test for lights
* Add prometheus test for lock
* Add prometheus test for sensor fahrenheit conversion
* Fix prometheus test for input_number
* Update entity registry handling
* Add and use fixtures to test setup via config entry
* Remove legacy redundant tests
* Remove unnecessary mock_coro
* Remove unnecessary namespace change
* Move zeroconf payload to fixture
* Begin adding Sonos to codecov
* Mock proper return value
* Revert return value for platform
* Add select entity for Yamaha MusicCast Capabilities
* Add musiccast select to .coveragerc
* Move status strings to string.select.json and auto generate the english translations from it. Let the device class start with yamaha_musiccast__.
* Make all device classes lower case
* Use platform enum to add select
* 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>
* Configuration via UI
Config flow / YAML deprecation
- Support discovery via MAC address
- Support import of YAML config
- Switch to ConfigEntry, get rid of platform setup
* Fix review comments
* More tests for vicare yaml import
* 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
* Move "Battery:SmartBatteryControl:Enable" from a simple sensor to a switch
Add "Battery:TimeControl:Enable" as a switch
If you want to change charging behavior you need to turn off both switches, before you can enable the function you want. (Same as on Plenticore UI)
* removed:
@property
def assumed_state(self) -> bool
was copied from an switchbot integration, does not make sense or does deliver valuable information
Tried to set constant properties in the constructor
* correct typo, add new line at eof
* Initial state of switch was missing after (re)starting HA. Now working.
* Reformatted with black
* correct syntax errors from test run 09.10.2021
* reformat
* update 15.10.2021
* Set select value is working
* update 05.11.2021
* data correctly received
* working completly
* remove old switch definitions, now replaced by select widget
* correct complaints from workflow run on 11/11/2021
* Add explanatory comment for switch and select
* Correct comments
* Removed function async def async_read_data(self, module_id: str, data_id: str)
from class SettingDataUpdateCoordinator
* Add Mixin class for read/write
* try to make select.py less "stale"
* new dev environment 2
* new dev environment 2
* correct syntax
* minor coding standard correction
* Remove BOM
* Remove BOM on select.py
* Updated .coveragerc
* 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 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 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.
* Refactor Xiaomi vacuum with sensors.
This is the first step into refactoring xiaomi vacuum attributes into sensors.
What is missing are some switches and binary sensors etc.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Use generic sensor for Xiaomi vacuum sensors.
By using HA coordinator, the generic Xiaomi sensor class can be used with these
coordinators to get the status sensors from vacuum. This also means now that
sensors are available as soon as HA starts, which is a nice plus.
Now the only reason to create a subclass of the generic sensors is when custom
value parsing needs to be done.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Working vacuum sensors via 1 coordinator.
Vacuum needs a custom coordinator to ensure that it fetches all the needed data
and puts it in a dict. From this dict the sensors will then get their data
accordingly.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Remove vacuum setup method in sensor
Sensor is generic enough that vacuum does not require its own setup method.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Don't auto register generic sensors.
Let the user decide which sensor is useful for them and enable them.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Remove converted attributes from xiaomi vacuum.
The attributes that have been converted so far should be removed from the vacuum
attributes list.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Fetch data from vacuum sequentially.
It seems some vacuums do not like parallel requests. The requests that came
before are ignored.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Refactor vacuum sensors to its own container.
By moving vacuum sensors to its own container, there is no more key collisions.
This in turns means that there is need for the split hack to ensure key names
are correct.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* fixup! fix bad rebase.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Fix sensor naming and default registration.
Use proper names for sensors, no need to include from which device status it
came.
Registration of the sensor by default has been parameterised. If the param is
not set, the sensor is not registered.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Make vacuum platform also use coordinator for its data.
By using the coordinator for data in vacuum platfrom, removes the cases where
request gets ignored during the case where the requests are done concurrently by
separate platforms.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Add binary sensor for vacuum
Add binary sensor for waterbox, mop, and water shortage.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Added proper icons to sensors.
https://github.com/home-assistant/core/issues/51361
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Refactor sensors to use dataclass.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Make vacuum use coordinator for its data.
This commit also insures that the binary sensors are only registered for devices
that include a mop.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Minor refactoring
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Update data from coordinator after running command.
This is is to have a faster status change when executing a command like changing
fan speeds. If a manual refresh is not triggered. Worst case scenario it will
take 10s for the new fan speed to be reported in HA.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Refresh within coroutine is ok.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Move logging to _handle_coordinator_update
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Use internal state attribute.
Signed-off-by: Kevin Hellemun <17928966+OGKevin@users.noreply.github.com>
* Fix vacuum typing
* Fix tests constants
* Fix vacuum inconsistent return values
* Fix vacuum state update
* Fix vacuum tests
* Remove impossible cases
* Parametrize custom services test
* Move goto test
* Move clean segment test
* Move clean single segment test
* Test service pause
* Include vacuum in coverage
* Delint
* Fix vacuum sensor dict collision.
This also prevents collision for unique id. As the key is used to construct
unique ids.
* Use f strings as dict keys
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
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>
* 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>
* Move parts of ssdp to async_upnp_client
* Fix test for environments with multiple sources
* Fix sonos tests
* More fixes/changes
* More fixes
* Use async_upnp_client==0.21.0
* Pylint/test fixes
* More changes after review
* Fix tests
* Improve testing
* Fix mypy
* Fix yamaha_musiccast tests?
* Changes after review
* Pylint
* Reduce calls to combined_headers
* Update to async_upnp_client==0.21.1
* Update to async_upnp_client==0.21.2
* use as_dict
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add data update coordinator to the Tautulli integration
* update .coveragerc
* Add guard for UpdateFailed
* Apply suggestions from code review
Co-authored-by: Chris Talkington <chris@talkingtontech.com>
* ignore issues
Co-authored-by: Chris Talkington <chris@talkingtontech.com>