Add config flow to gogogate2 component (#34709)
* Add config flow to gogogate2 component. * Using a more stable gogogate api. * Getting config flows working better by using different downstream library. * Fixing options not getting default values. Adding availability to cover entity. * Simplifying return types of function. * Address PR feedback. * Making user config flow not abort. * Using DataUpdateCoordinator. * Addressing PR feedback. * Using standard method for using hass.data * Split auth fail test into separate tests.
This commit is contained in:
parent
6e0359efa6
commit
11b786a4fc
18 changed files with 1189 additions and 69 deletions
17
tests/components/gogogate2/conftest.py
Normal file
17
tests/components/gogogate2/conftest.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
"""Fixtures for tests."""
|
||||
|
||||
from mock import patch
|
||||
import pytest
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .common import ComponentFactory
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def component_factory(hass: HomeAssistant):
|
||||
"""Return a factory for initializing the gogogate2 api."""
|
||||
with patch(
|
||||
"homeassistant.components.gogogate2.common.GogoGate2Api"
|
||||
) as gogogate2_api_mock:
|
||||
yield ComponentFactory(hass, gogogate2_api_mock)
|
Loading…
Add table
Add a link
Reference in a new issue