* Avoid probing ipp printers for unique_id when it is available via mdns
We would always probe the device in the ipp flow and than
abort if it was already configured. We avoid the probe for
most printers.
* dry
* coverage
* fix test
* add test for updating host
* Cache device triggers on startup
* reorg zha init
* don't reuse gateway
* don't nuke yaml configuration
* review comments
* Add unit tests
* Do not cache device and entity registries
* [WIP] Wrap ZHA data in a dataclass
* [WIP] Get unit tests passing
* Use a helper function for getting the gateway object to fix annotations
* Remove `bridge_id`
* Fix typing issues with entity references in group websocket info
* Use `Platform` instead of `str` for entity platform matching
* Use `get_zha_gateway` in a few more places
* Fix flaky unit test
* Use `slots` for ZHA data
Co-authored-by: J. Nick Koston <nick@koston.org>
---------
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Do not connect to the radio hardware within `_connect_zigpy_app`
* Make `connect_zigpy_app` public
* Create radio manager instances from config entries
* Cache device triggers on startup
* reorg zha init
* don't reuse gateway
* don't nuke yaml configuration
* review comments
* Fix existing unit tests
* Ensure `app.shutdown` is called, not just `app.disconnect`
* Revert creating group entities and device registry entries early
* Add unit tests
---------
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
* Also handle DiscovergyClientError as UpdateFailed
* Change AccessTokenExpired to InvalidLogin
* Also add DiscovergyClientError to config flow and tests
* add unit tests for sensors
* newline long strings
* unit test check and move time
* rename entry to entity
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* add types to test
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* fix newlined f strings
* remove if statement
* add some more explaination
* Update datetime
Co-authored-by: Robert Resch <robert@resch.dev>
* Simpler time update
Co-authored-by: Robert Resch <robert@resch.dev>
* add missing datetime import
* Update docustring - grammar
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* address comments and issues raised
* address docstrings too long
* Fix docstring
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Change SSDP discovery scan interval to 10 minutes
The first version used a scan interval of 1 minute which we
increased to 2 minutes because it generated too much traffic.
We kept it at 2 minutes because Sonos historicly needed to
get SSDP discovery to stay alive. This is no longer the case
as Sonos has multiple ways to keep from going unavailable:
- mDNS support was added
- We now listen for SSDP alive and good bye all the time
- Each incoming packet from the device keeps it alive now
- We probe when we think the device might be offline
This means it should no longer be necessary to have such a
frequent scan which is a drag on all devices on the network
since its multicast
* adjust tests
* added zdb5100 light
* added light to zdb5100
* Update tests/components/zwave_js/conftest.py
agree
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/zwave_js/conftest.py
agree
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Rename logic_group_zdb5100_light_state.json to logic_group_zdb5100_state.json
name change
* Update tests/components/zwave_js/test_light.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update test_light.py
updated test and state
* Update test_light.py
incorrect endpoint
* changed the state
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Add diagnostics platform
* Add diagnostic platform
* Add raw data to diagnostics
* Remove config data
bump aioaladdinconnect, use new doors property for diag
* remove unnecessary component config
refactor diag output
* Use config entry ID as unique ID
* Add entry migration to v2 and and remove helper module
* Remove unneeded strings
* Add asserts for config, device and entity entries and improve comments
* Add debug log for config entry migration
* Reset config entry unique ID and use config entry ID instead
* Remove unnecessary unique ID debug log
* Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix
* Revert "Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix"
This reverts commit 07de334606054097e914404da04950e952bef6d2.
* Remove unused logger in entity module
* Handle temp adjust when target state not set
* Update homeassistant/components/alexa/errors.py
Co-authored-by: Robert Resch <robert@resch.dev>
* black
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* Use loop time to set context
loop time is faster than utcnow, and since its only used internally it can
be switched without a breaking change
* fix mocking
* Allow specifying a custom log function for template render
* Bypass template cache when reporting errors + fix tests
* Send errors as events
* Fix logic for creating new TemplateEnvironment
* Add strict mode back
* Only send error events if report_errors is True
* Force test of websocket_api only
* Debug test
* Run pytest with higher verbosity
* Timeout after 1 minute, enable syslog output
* Adjust timeout
* Add debug logs
* Fix unsafe call to WebSocketHandler._send_message
* Remove debug code
* Improve test coverage
* Revert accidental change
* Include severity in error events
* Remove redundant information from error events
* Show OTA update progress
* Use an event listener instead of a dispatcher
* Add tests
* Fix name
* Improve tests coverage
* Fix subscribe/unsubscribe logic
* Use async_on_remove()
* Fix memory leak in dispatcher removal
When we removed the last job/callable from the dict for the
signal we did not remove the dict for the signal which meant
it leaked
* comment
* cleanup a bit more
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* fix json
* cover
* Set state of entity with invalid state to unknown
* Add test
* Apply suggestions from code review
Co-authored-by: Robert Resch <robert@resch.dev>
* Update test_entity.py
---------
Co-authored-by: Robert Resch <robert@resch.dev>
* Extend template entities with a script section
This allows making a trigger entity that triggers a few times a day,
and allows collecting data from a service resopnse which can be
fed into a template entity.
The current alternatives are to publish and subscribe to events or to
store data in input entities.
* Make variables set in actions accessible to templates
* Format code
---------
Co-authored-by: Erik <erik@montnemery.com>
* Shared fixture on TEMP_DIR_NAME mock in MQTT tests
* Improve mqtt certificate file tests
* Update tests/components/mqtt/test_util.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update tests/components/mqtt/conftest.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Avoid blocking code
* typo in sub function
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Add the SiLabs flasher as a dependency
* Create a repair if the wrong firmware is detected on an EZSP device
* Update homeassistant/components/zha/strings.json
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
* Provide the ZHA config entry as a reusable fixture
* Create a separate repair when using non-Nabu Casa hardware
* Add unit tests
* Drop extraneous `config_entry.add_to_hass` added in 021def44
* Fully unit test all edge cases
* Move `socket://`-ignoring logic into repair function
* Open a repair from ZHA flows when the wrong firmware is running
* Fix existing unit tests
* Link to the flashing section in the documentation
* Reduce repair severity to `ERROR`
* Make issue persistent
* Add unit tests for new radio probing states
* Add unit tests for new config flow steps
* Handle probing failure raising an exception
* Implement review suggestions
* Address review comments
---------
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>