Don't set entity_id in ZHA entities (#28362)

* Don't set entity_id on ZHA entities.
* Update tests.
* Use comma as separator for multiple channel names.
* Address PR comments.
This commit is contained in:
Alexei Chetroi authored and GitHub committed 2019-10-31 12:31:06 -04:00
1 parent d133501735
commit 89213a4ce8
9 files changed
+55 -66

No files matched your search

+4 -3
View File
@@ -16,8 +16,8 @@ from .common import (
async_enable_traffic,
async_init_zigpy_device,
async_test_device_join,
find_entity_id,
make_attribute,
make_entity_id,
make_zcl_header,
)
@@ -47,8 +47,9 @@ async def test_device_tracker(hass, config_entry, zha_gateway):
await hass.async_block_till_done()
cluster = zigpy_device.endpoints.get(1).power
entity_id = make_entity_id(DOMAIN, zigpy_device, cluster, use_suffix=False)
zha_device = zha_gateway.get_device(zigpy_device.ieee)
entity_id = await find_entity_id(DOMAIN, zha_device, hass)
assert entity_id is not None
# test that the device tracker was created and that it is unavailable
assert hass.states.get(entity_id).state == STATE_UNAVAILABLE
@@ -90,6 +91,6 @@ async def test_device_tracker(hass, config_entry, zha_gateway):
hass,
zha_gateway,
general.PowerConfiguration.cluster_id,
DOMAIN,
entity_id,
SMARTTHINGS_ARRIVAL_SENSOR_DEVICE_TYPE,
)