P1 Monitor add water meter support (#74004)
This commit is contained in:
parent
eec45c1208
commit
b8d8d5540e
13 changed files with 367 additions and 231 deletions
|
@ -2,7 +2,7 @@
|
|||
import json
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
from p1monitor import Phases, Settings, SmartMeter
|
||||
from p1monitor import Phases, Settings, SmartMeter, WaterMeter
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.p1_monitor.const import DOMAIN
|
||||
|
@ -43,7 +43,12 @@ def mock_p1monitor():
|
|||
json.loads(load_fixture("p1_monitor/settings.json"))
|
||||
)
|
||||
)
|
||||
yield p1monitor_mock
|
||||
client.watermeter = AsyncMock(
|
||||
return_value=WaterMeter.from_dict(
|
||||
json.loads(load_fixture("p1_monitor/watermeter.json"))
|
||||
)
|
||||
)
|
||||
yield client
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue