* Add multi-zone support to Anthem AV receiver and distribution amplifier
* Fix typo in comment
* Convert properties to attribute and add test
* Migrate entity name
* Fix after rebase add strict typing and bump version
* fix typing
* Simplify test
* Small improvement
* remove dispatcher send and use callback
* 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
* 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
homeassistant/components/deconz/light.py:66: error: Incompatible types in assignment (expression has type "List[Union[ConfigurationTool, Cover, Fan, Light, Lock, Siren]]", variable has type "Optional[List[Light]]") [assignment]
homeassistant/components/deconz/light.py:68: error: Item "None" of "Optional[List[Light]]" has no attribute "__iter__" (not iterable) [union-attr]
homeassistant/components/deconz/light.py:159: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode" [union-attr]
homeassistant/components/deconz/light.py:159: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode" [union-attr]
homeassistant/components/deconz/light.py:161: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode" [union-attr]
homeassistant/components/deconz/light.py:161: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode" [union-attr]
homeassistant/components/deconz/light.py:163: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode" [union-attr]
homeassistant/components/deconz/light.py:163: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_mode" [union-attr]
homeassistant/components/deconz/light.py:165: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness" [union-attr]
homeassistant/components/deconz/light.py:165: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness" [union-attr]
homeassistant/components/deconz/light.py:174: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:174: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness" [union-attr]
homeassistant/components/deconz/light.py:174: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:174: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "brightness" [union-attr]
homeassistant/components/deconz/light.py:179: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:179: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_temp" [union-attr]
homeassistant/components/deconz/light.py:179: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:179: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "color_temp" [union-attr]
homeassistant/components/deconz/light.py:179: error: Incompatible return value type (got "Union[int, None, Any]", expected "int") [return-value]
homeassistant/components/deconz/light.py:179: note: Error code "return-value" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:184: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "hue" [union-attr]
homeassistant/components/deconz/light.py:184: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "hue" [union-attr]
homeassistant/components/deconz/light.py:184: error: Unsupported operand types for / ("None" and "int") [operator]
homeassistant/components/deconz/light.py:184: note: Left operand is of type "Union[int, None, Any]"
homeassistant/components/deconz/light.py:184: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "saturation" [union-attr]
homeassistant/components/deconz/light.py:184: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "saturation" [union-attr]
homeassistant/components/deconz/light.py:189: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:189: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "xy" [union-attr]
homeassistant/components/deconz/light.py:189: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:189: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "xy" [union-attr]
homeassistant/components/deconz/light.py:194: error: Unused "type: ignore" comment
homeassistant/components/deconz/light.py:194: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "state" [union-attr]
homeassistant/components/deconz/light.py:194: note: Error code "union-attr" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:194: error: Incompatible return value type (got "Union[bool, None, Any]", expected "bool") [return-value]
homeassistant/components/deconz/light.py:194: note: Error code "return-value" not covered by "type: ignore" comment
homeassistant/components/deconz/light.py:228: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state" [union-attr]
homeassistant/components/deconz/light.py:228: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state" [union-attr]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Union[str, None, Literal['none', 'select', 'lselect']]" [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[int]" [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Union[str, None, Literal['colorloop', 'none']]" [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[bool]" [arg-type]
homeassistant/components/deconz/light.py:228: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, float, int, str, Tuple[float, float]]]"; expected "Optional[Tuple[float, float]]" [arg-type]
homeassistant/components/deconz/light.py:232: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "state" [union-attr]
homeassistant/components/deconz/light.py:245: error: Item "LightBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state" [union-attr]
homeassistant/components/deconz/light.py:245: error: Item "SensorBase" of "Union[Group, LightBase, SensorBase]" has no attribute "set_state" [union-attr]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Union[str, None, Literal['none', 'select', 'lselect']]" [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[int]" [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Union[str, None, Literal['colorloop', 'none']]" [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[bool]" [arg-type]
homeassistant/components/deconz/light.py:245: error: Argument 1 to "set_state" of "Group" has incompatible type "**Dict[str, Union[bool, int, str]]"; expected "Optional[Tuple[float, float]]" [arg-type]
* 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
* Enable strict typing for usb
* Enable strict typing for usb
* Enable strict typing for usb
* adjust
* coverage
* Update tests/components/usb/test_init.py
* 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>
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>
* 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>
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Improve typing
* One more typing fix
* Run hassfest
* Fix test
* Fix return from constructor
* Add missing Final
* Improve long string format
* Use bool for mute
* Remove unnecessary str type
* Fix host type
* Add missing Final
* Increase test coverage
* Suggested change
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
* Improve type annotations
* Remove unused argument
* Simplify state logic
* Fix uvindex state
* Fix type for logger
* Increase tests coverage
* Fix pylint arguments-differ error
* Suggested change
* Suggested change
* Remove unnecessary variable
* Remove unnecessary conditions
* Use int instead of list for forecast days
* Add enabled to sensor types dicts
* Fix request_remaining conversion and tests
* Run hassfest
* Suggested change
* Suggested change
* Do not use StateType
* Add full typing to kraken
* Let device_info return DeviceInfo
* Replace unsub_listeners with entry.async_on_unload
* Raise TypeError on end of _try_get_state
* Assert Coordinator is not none
* Add class SensorType
* Add strict typing to kraken
* Add changes from code review
* Revert typed dict creation