Refactor ZHA tests (#55844)

* Replace ZHA tests FakeDevice

* Refactor ZHA tests to use zigpy devices and endpoints

* Use common consts for zigpy device mocks

Use the same dict key names for device signature mocks as zha quirks.

* Use const for test device list

* Update tests/components/zha/common.py
This commit is contained in:
Alexei Chetroi 2021-09-06 19:00:06 -04:00 committed by GitHub
parent b1dbdec2ea
commit c6888e4faf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 2614 additions and 2592 deletions

View file

@ -503,7 +503,7 @@ class ZHADevice(LogMixin):
names.append(
{
ATTR_NAME: f"unknown {endpoint.device_type} device_type "
f"of 0x{endpoint.profile_id:04x} profile id"
f"of 0x{(endpoint.profile_id or 0xFFFF):04x} profile id"
}
)
device_info[ATTR_ENDPOINT_NAMES] = names