* first version of new integration * moved icon to shared consts * added unit tests * transformed from geolocation to sensor integration * alert level is now the state of the sensor * adopted unit tests * fixed comment * keep all sensors registered even if the feed update fails intermittently * bumped version of upstream library * bumped version of integration library * regenerated requirements * bumped version of integration library * bumped version of integration library * fixed generated file * removed commented out code * regenerated config flow file * update to latest integration library version * simplified code * removed debug log statement * simplified code structure * defined constant * use core interfaces * moved test and fixture * sorted imports * simplified patching * moved fixture to central config file
29 lines
688 B
Python
29 lines
688 B
Python
"""Configuration for GeoNet NZ Volcano tests."""
|
|
import pytest
|
|
|
|
from homeassistant.components.geonetnz_volcano import DOMAIN
|
|
from homeassistant.const import (
|
|
CONF_LATITUDE,
|
|
CONF_LONGITUDE,
|
|
CONF_RADIUS,
|
|
CONF_UNIT_SYSTEM,
|
|
CONF_SCAN_INTERVAL,
|
|
)
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
@pytest.fixture
|
|
def config_entry():
|
|
"""Create a mock GeoNet NZ Volcano config entry."""
|
|
return MockConfigEntry(
|
|
domain=DOMAIN,
|
|
data={
|
|
CONF_LATITUDE: -41.2,
|
|
CONF_LONGITUDE: 174.7,
|
|
CONF_RADIUS: 25,
|
|
CONF_UNIT_SYSTEM: "metric",
|
|
CONF_SCAN_INTERVAL: 300.0,
|
|
},
|
|
title="-41.2, 174.7",
|
|
)
|