* Add ecoforest integration
* fix file title
* remove host default from schema, hints will be given in the documentation
* moved input validation to async_step_user
* ensure we can receive device data while doing entry setup
* remove unecessary check before unique id is set
* added shorter syntax for async create entry
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* use variable to set unique id
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Use _attr_has_entity_name from base entity
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* remove unecessary comments in coordinator
* use shorthand for device information
* remove empty objects from manifest
* remove unecessary flag
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* use _async_abort_entries_match to ensure device is not duplicated
* remove unecessary host attr
* fixed coordinator host attr to be used by entities to identify device
* remove unecessary assert
* use default device class temperature trasnlation key
* reuse base entity description
* use device serial number as identifier
* remove unused code
* Improve logging message
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Remove unused errors
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Raise a generic update failed
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* use coordinator directly
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* No need to check for serial number
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* rename variable
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* use renamed variable
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* improve assertion
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* use serial number in entity unique id
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* raise config entry not ready on setup when error in connection
* improve test readability
* Improve python syntax
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* abort when device already configured with same serial number
* improve tests
* fix test name
* use coordinator data
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* improve asserts
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* fix ci
* improve error handling
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Only call `async_ha_write_state` on changes.
* Make helper class
* Use UndefinedType
* Remove del
* Integrate monitor into MqttEntity
* Track extra state attributes and availability
* Add `__slots__`
* Add monitor to MqttAttributes and MqttAvailability
* Write out loop
* Add test
* Make common test and parameterize
* Add test for last_reset attribute
* MqttMonitorEntity base class
* Rename attr and update docstr `track` method.
* correction doct
* Implement as a decorator
* Move tracking functions into decorator
* Rename decorator
* Follow up comment
```
$ python3 -q
>>> import datetime, time
>>> time.tzname
('EET', 'EEST')
>>> datetime.datetime.max.timestamp()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: year 10000 is out of range
```
* Add event platform for gen2 devices
* Add tests
* Add removal condition
* Simplify RpcEventDescription; fix availability
* Improve names and docstrings
* Improve the event entity name
* Use async_on_remove()
* Improve tests coverage
* Improve tests coverage
* Prefix the entity name with the device name in the old way
* Black
* Use DeviceInfo object
* Switches via API
* Using external library
* UT and checlist
* Updating file .coveragerc
* Update homeassistant/components/switchbot_via_api/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/switchbot_via_api/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Update homeassistant/components/switchbot_via_api/switch.py
Co-authored-by: J. Nick Koston <nick@koston.org>
* Review fixes
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
* This base class shouldn't know about Remote
* Fixing suggestion
* Sometimes, the state from the API is not updated immediately
* Review changes
* Some review changes
* Review changes
* Review change: Adding type on commands
* Parameterizing some tests
* Review changes
* Updating .coveragerc
* Fixing error handling in coordinator
* Review changes
* Review changes
* Adding switchbot brand
* Apply suggestions from code review
Co-authored-by: J. Nick Koston <nick@koston.org>
* Review changes
* Adding strict typing
* Removing log in constructor
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Late review for honeywell
* Actually test same id different domain
* Update homeassistant/components/honeywell/climate.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update climate.py
* Refactor dont_remove
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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