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

+3 -2
View File
@@ -11,8 +11,8 @@ from homeassistant.const import STATE_LOCKED, STATE_UNAVAILABLE, STATE_UNLOCKED
from .common import (
async_enable_traffic,
async_init_zigpy_device,
find_entity_id,
make_attribute,
make_entity_id,
make_zcl_header,
)
@@ -39,8 +39,9 @@ async def test_lock(hass, config_entry, zha_gateway):
await hass.async_block_till_done()
cluster = zigpy_device.endpoints.get(1).door_lock
entity_id = make_entity_id(DOMAIN, zigpy_device, cluster)
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 lock was created and that it is unavailable
assert hass.states.get(entity_id).state == STATE_UNAVAILABLE