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:
parent
0ba54ee9b7
commit
31b2f331db
19 changed files with 104 additions and 83 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue