Library refactorization of deCONZ (#23725)

* Improved sensors

* Lib update signalling

* Replace reason with changed

* Move imports to top of file

* Add support for secondary temperature reported by some Xiaomi devices

* Bump dependency to v59
This commit is contained in:
Robert Svensson 2019-05-27 06:56:00 +02:00 committed by GitHub
parent 0ba54ee9b7
commit 31b2f331db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 104 additions and 83 deletions

View file

@ -1,6 +1,8 @@
"""deCONZ sensor platform tests."""
from unittest.mock import Mock, patch
from tests.common import mock_coro
from homeassistant import config_entries
from homeassistant.components import deconz
from homeassistant.helpers.dispatcher import async_dispatcher_send
@ -8,8 +10,6 @@ from homeassistant.setup import async_setup_component
import homeassistant.components.sensor as sensor
from tests.common import mock_coro
SENSOR = {
"1": {
@ -142,6 +142,7 @@ async def test_add_new_sensor(hass):
sensor = Mock()
sensor.name = 'name'
sensor.type = 'ZHATemperature'
sensor.BINARY = False
sensor.register_async_callback = Mock()
async_dispatcher_send(
hass, gateway.async_event_new_device('sensor'), [sensor])