Compare commits

..

1 Commits

Author SHA1 Message Date
Franck Nijhof
32572072d3 Mock async_setup_entry in ccm15 config flow tests 2026-02-27 17:19:29 +00:00
43 changed files with 80 additions and 1767 deletions

4
CODEOWNERS generated
View File

@@ -1901,8 +1901,8 @@ build.json @home-assistant/supervisor
/tests/components/withings/ @joostlek
/homeassistant/components/wiz/ @sbidy @arturpragacz
/tests/components/wiz/ @sbidy @arturpragacz
/homeassistant/components/wled/ @frenck @mik-laj
/tests/components/wled/ @frenck @mik-laj
/homeassistant/components/wled/ @frenck
/tests/components/wled/ @frenck
/homeassistant/components/wmspro/ @mback2k
/tests/components/wmspro/ @mback2k
/homeassistant/components/wolflink/ @adamkrol93 @mtielen

View File

@@ -33,8 +33,6 @@ DUNEHD_PLAYER_SUPPORT: Final[MediaPlayerEntityFeature] = (
| MediaPlayerEntityFeature.PLAY
| MediaPlayerEntityFeature.PLAY_MEDIA
| MediaPlayerEntityFeature.BROWSE_MEDIA
| MediaPlayerEntityFeature.VOLUME_STEP
| MediaPlayerEntityFeature.VOLUME_MUTE
)

View File

@@ -177,12 +177,6 @@
"on": "mdi:lightbulb-on"
}
},
"do_not_disturb": {
"default": "mdi:minus-circle-off",
"state": {
"on": "mdi:minus-circle"
}
},
"dry_plus": {
"default": "mdi:heat-wave"
},

View File

@@ -95,7 +95,6 @@ ROBOT_CLEANER_TURBO_MODE_STATE_MAP = {
ROBOT_CLEANER_MOVEMENT_MAP = {
"powerOff": "off",
"washingMop": "washing_mop",
}
OVEN_MODE = {
@@ -881,7 +880,6 @@ CAPABILITY_TO_SENSORS: dict[
"after",
"cleaning",
"pause",
"washing_mop",
],
device_class=SensorDeviceClass.ENUM,
value_fn=lambda value: ROBOT_CLEANER_MOVEMENT_MAP.get(value, value),

View File

@@ -718,8 +718,7 @@
"off": "[%key:common::state::off%]",
"pause": "[%key:common::state::paused%]",
"point": "Point",
"reserve": "Reserve",
"washing_mop": "Washing mop"
"reserve": "Reserve"
}
},
"robot_cleaner_turbo_mode": {
@@ -859,9 +858,6 @@
"display_lighting": {
"name": "Display lighting"
},
"do_not_disturb": {
"name": "Do not disturb"
},
"dry_plus": {
"name": "Dry plus"
},

View File

@@ -162,14 +162,6 @@ CAPABILITY_TO_SWITCHES: dict[Capability | str, SmartThingsSwitchEntityDescriptio
status_attribute=Attribute.STATUS,
entity_category=EntityCategory.CONFIG,
),
Capability.CUSTOM_DO_NOT_DISTURB_MODE: SmartThingsSwitchEntityDescription(
key=Capability.CUSTOM_DO_NOT_DISTURB_MODE,
translation_key="do_not_disturb",
status_attribute=Attribute.DO_NOT_DISTURB,
entity_category=EntityCategory.CONFIG,
on_command=Command.DO_NOT_DISTURB_ON,
off_command=Command.DO_NOT_DISTURB_OFF,
),
}
DISHWASHER_WASHING_OPTIONS_TO_SWITCHES: dict[
Attribute | str, SmartThingsDishwasherWashingOptionSwitchEntityDescription

View File

@@ -1,7 +1,7 @@
{
"domain": "wled",
"name": "WLED",
"codeowners": ["@frenck", "@mik-laj"],
"codeowners": ["@frenck"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/wled",
"integration_type": "device",

View File

@@ -19,16 +19,18 @@ async def test_setup_entry(config_entry_setup: MockConfigEntry) -> None:
async def test_setup_entry_fails(
hass: HomeAssistant, config_entry: MockConfigEntry
) -> None:
"""Test failed setup of entry."""
"""Test successful setup of entry."""
config_entry.add_to_hass(hass)
with patch(
"homeassistant.components.axis.get_axis_api",
side_effect=axis.CannotConnect,
):
await hass.config_entries.async_setup(config_entry.entry_id)
mock_device = Mock()
mock_device.async_setup = AsyncMock(return_value=False)
assert config_entry.state is ConfigEntryState.SETUP_RETRY
with patch.object(axis, "AxisHub") as mock_device_class:
mock_device_class.return_value = mock_device
assert not await hass.config_entries.async_setup(config_entry.entry_id)
assert config_entry.state is ConfigEntryState.SETUP_ERROR
async def test_unload_entry(

View File

@@ -79,7 +79,9 @@ async def test_form_invalid_host(
assert result2["type"] is FlowResultType.CREATE_ENTRY
async def test_form_cannot_connect(hass: HomeAssistant) -> None:
async def test_form_cannot_connect(
hass: HomeAssistant, mock_setup_entry: AsyncMock
) -> None:
"""Test we handle cannot connect error."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
@@ -111,7 +113,9 @@ async def test_form_cannot_connect(hass: HomeAssistant) -> None:
assert result2["type"] is FlowResultType.CREATE_ENTRY
async def test_form_unexpected_error(hass: HomeAssistant) -> None:
async def test_form_unexpected_error(
hass: HomeAssistant, mock_setup_entry: AsyncMock
) -> None:
"""Test we handle cannot connect error."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}

View File

@@ -1,8 +1,7 @@
"""Tests for the Daikin config flow."""
from collections.abc import Generator
from ipaddress import ip_address
from unittest.mock import AsyncMock, PropertyMock, patch
from unittest.mock import PropertyMock, patch
from aiohttp import ClientError, web_exceptions
from pydaikin.exceptions import DaikinException
@@ -21,15 +20,6 @@ MAC = "AABBCCDDEEFF"
HOST = "127.0.0.1"
@pytest.fixture(autouse=True)
def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry."""
with patch(
"homeassistant.components.daikin.async_setup_entry", return_value=True
) as mock_setup:
yield mock_setup
@pytest.fixture
def mock_daikin():
"""Mock pydaikin."""

View File

@@ -1,10 +1,5 @@
"""Tests for emulated_roku config flow."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
import pytest
from homeassistant import config_entries
from homeassistant.components.emulated_roku import config_flow
from homeassistant.core import HomeAssistant
@@ -13,15 +8,6 @@ from homeassistant.data_entry_flow import FlowResultType
from tests.common import MockConfigEntry
@pytest.fixture(autouse=True)
def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry."""
with patch(
"homeassistant.components.emulated_roku.async_setup_entry", return_value=True
) as mock_setup:
yield mock_setup
async def test_flow_works(hass: HomeAssistant) -> None:
"""Test that config flow works."""
result = await hass.config_entries.flow.async_init(

View File

@@ -76,10 +76,6 @@ async def test_config_flow(hass: HomeAssistant, config_entry: MockConfigEntry) -
"homeassistant.components.forked_daapd.ForkedDaapdAPI.get_request",
autospec=True,
) as mock_get_request,
patch(
"homeassistant.components.forked_daapd.async_setup_entry",
return_value=True,
),
):
mock_get_request.return_value = SAMPLE_CONFIG
mock_test_connection.return_value = ["ok", "My Music on myhost"]
@@ -233,16 +229,10 @@ async def test_config_flow_zeroconf_valid(hass: HomeAssistant) -> None:
async def test_options_flow(hass: HomeAssistant, config_entry: MockConfigEntry) -> None:
"""Test config flow options."""
with (
patch(
"homeassistant.components.forked_daapd.ForkedDaapdAPI.get_request",
autospec=True,
) as mock_get_request,
patch(
"homeassistant.components.forked_daapd.async_setup_entry",
return_value=True,
),
):
with patch(
"homeassistant.components.forked_daapd.ForkedDaapdAPI.get_request",
autospec=True,
) as mock_get_request:
mock_get_request.return_value = SAMPLE_CONFIG
config_entry.add_to_hass(hass)
await hass.config_entries.async_setup(config_entry.entry_id)

View File

@@ -336,13 +336,7 @@ async def test_entity_migration(
config_entry=config_entry_v1_1,
)
with (
patch("homeassistant.components.home_connect.PLATFORMS", platforms),
patch(
"homeassistant.components.home_connect.async_setup_entry",
return_value=True,
),
):
with patch("homeassistant.components.home_connect.PLATFORMS", platforms):
await hass.config_entries.async_setup(config_entry_v1_1.entry_id)
await hass.async_block_till_done()
@@ -370,12 +364,8 @@ async def test_config_entry_unique_id_migration(
assert config_entry_v1_2.unique_id != "1234567890"
assert config_entry_v1_2.minor_version == 2
with patch(
"homeassistant.components.home_connect.async_setup_entry",
return_value=True,
):
await hass.config_entries.async_setup(config_entry_v1_2.entry_id)
await hass.async_block_till_done()
await hass.config_entries.async_setup(config_entry_v1_2.entry_id)
await hass.async_block_till_done()
assert config_entry_v1_2.unique_id == "1234567890"
assert config_entry_v1_2.minor_version == 3

View File

@@ -1,7 +1,5 @@
"""The tests for the Homematic notification platform."""
from unittest.mock import MagicMock, patch
from homeassistant.components.notify import DOMAIN as NOTIFY_DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
@@ -11,15 +9,11 @@ from tests.common import assert_setup_component
async def test_setup_full(hass: HomeAssistant) -> None:
"""Test valid configuration."""
with patch(
"homeassistant.components.homematic.HMConnection",
return_value=MagicMock(),
):
await async_setup_component(
hass,
"homematic",
{"homematic": {"hosts": {"ccu2": {"host": "127.0.0.1"}}}},
)
await async_setup_component(
hass,
"homematic",
{"homematic": {"hosts": {"ccu2": {"host": "127.0.0.1"}}}},
)
with assert_setup_component(1, domain="notify") as handle_config:
assert await async_setup_component(
hass,
@@ -41,15 +35,11 @@ async def test_setup_full(hass: HomeAssistant) -> None:
async def test_setup_without_optional(hass: HomeAssistant) -> None:
"""Test valid configuration without optional."""
with patch(
"homeassistant.components.homematic.HMConnection",
return_value=MagicMock(),
):
await async_setup_component(
hass,
"homematic",
{"homematic": {"hosts": {"ccu2": {"host": "127.0.0.1"}}}},
)
await async_setup_component(
hass,
"homematic",
{"homematic": {"hosts": {"ccu2": {"host": "127.0.0.1"}}}},
)
with assert_setup_component(1, domain="notify") as handle_config:
assert await async_setup_component(
hass,

View File

@@ -136,7 +136,6 @@ def fixture_mock_config_entry() -> MockConfigEntry:
async def fixture_mock_integration(
hass: HomeAssistant,
mock_config_entry: MockConfigEntry,
mock_device: MagicMock,
) -> MockConfigEntry:
"""Return a mock ConfigEntry setup for the integration."""
with (

View File

@@ -400,18 +400,14 @@ async def test_reconfigure(
return_value={"scb:network": {"Hostname": "scb"}}
)
with patch(
"homeassistant.components.kostal_plenticore.async_setup_entry",
return_value=True,
):
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
"host": "1.1.1.1",
"password": "test-password",
},
)
await hass.async_block_till_done()
result = await hass.config_entries.flow.async_configure(
result["flow_id"],
{
"host": "1.1.1.1",
"password": "test-password",
},
)
await hass.async_block_till_done()
mock_apiclient_class.assert_called_once_with(ANY, "1.1.1.1")
mock_apiclient.__aenter__.assert_called_once()

View File

@@ -90,7 +90,6 @@ async def test_device_already_configured(
async def test_user_step_fail_with_error(
hass: HomeAssistant,
mock_lunatone_info: AsyncMock,
mock_setup_entry: AsyncMock,
exception: Exception,
expected_error: str,
) -> None:
@@ -125,7 +124,6 @@ async def test_user_step_fail_with_error(
async def test_reconfigure(
hass: HomeAssistant,
mock_lunatone_info: AsyncMock,
mock_setup_entry: AsyncMock,
mock_config_entry: MockConfigEntry,
) -> None:
"""Test reconfigure flow."""
@@ -155,7 +153,6 @@ async def test_reconfigure(
async def test_reconfigure_fail_with_error(
hass: HomeAssistant,
mock_lunatone_info: AsyncMock,
mock_setup_entry: AsyncMock,
mock_config_entry: MockConfigEntry,
exception: Exception,
expected_error: str,

View File

@@ -46,6 +46,6 @@
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
'state': 'off',
})
# ---

View File

@@ -20,7 +20,6 @@ from tests.common import MockConfigEntry, snapshot_platform
async def test_binary_sensor_setup(
hass: HomeAssistant,
snapshot: SnapshotAssertion,
mock_madvr_client: AsyncMock,
mock_config_entry: MockConfigEntry,
entity_registry: er.EntityRegistry,
) -> None:

View File

@@ -38,7 +38,6 @@ from tests.common import MockConfigEntry, snapshot_platform
async def test_remote_setup(
hass: HomeAssistant,
snapshot: SnapshotAssertion,
mock_madvr_client: AsyncMock,
mock_config_entry: MockConfigEntry,
entity_registry: er.EntityRegistry,
) -> None:

View File

@@ -9,9 +9,7 @@ import pytest
@pytest.fixture
def mock_simple_manager_fail():
"""Mock datapoint Manager with default values for testing in config_flow."""
with patch(
"homeassistant.components.metoffice.config_flow.Manager"
) as mock_manager:
with patch("datapoint.Manager.Manager") as mock_manager:
instance = mock_manager.return_value
instance.get_forecast = APIException()
instance.latitude = None

View File

@@ -687,11 +687,10 @@ async def test_discovered_by_dhcp_updates_host(
assert config_entry.data[CONF_HOST] == "1.2.3.4"
await hass.config_entries.async_unload(config_entry.entry_id)
with patch("homeassistant.components.onvif.async_setup_entry", return_value=True):
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_DHCP}, data=DHCP_DISCOVERY
)
await hass.async_block_till_done()
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": SOURCE_DHCP}, data=DHCP_DISCOVERY
)
await hass.async_block_till_done()
assert result["type"] is FlowResultType.ABORT
assert result["reason"] == "already_configured"

View File

@@ -1,10 +1,8 @@
"""Test the Panasonic Viera config flow."""
from collections.abc import Generator
from unittest.mock import AsyncMock, patch
from unittest.mock import patch
from panasonic_viera import SOAPError
import pytest
from homeassistant import config_entries
from homeassistant.components.panasonic_viera.const import (
@@ -28,16 +26,6 @@ from .conftest import (
from tests.common import MockConfigEntry
@pytest.fixture(autouse=True)
def mock_setup_entry() -> Generator[AsyncMock]:
"""Mock setting up a config entry."""
with patch(
"homeassistant.components.panasonic_viera.async_setup_entry",
return_value=True,
) as mock_setup:
yield mock_setup
async def test_flow_non_encrypted(hass: HomeAssistant) -> None:
"""Test flow without encryption."""

View File

@@ -122,12 +122,9 @@ async def test_unknown_error(hass: HomeAssistant) -> None:
async def test_zero_conf(hass: HomeAssistant) -> None:
"""Test the manual flow for zero config."""
with (
patch(
"homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf",
return_value=("v3", API_KEY, "/test"),
),
patch_async_setup_entry(),
with patch(
"homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf",
return_value=("v3", API_KEY, "/test"),
):
result = await hass.config_entries.flow.async_init(
DOMAIN,
@@ -142,12 +139,9 @@ async def test_zero_conf(hass: HomeAssistant) -> None:
async def test_url_rewrite(hass: HomeAssistant) -> None:
"""Test auth flow url rewrite."""
with (
patch(
"homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf",
return_value=("v3", API_KEY, "/test"),
),
patch_async_setup_entry(),
with patch(
"homeassistant.components.radarr.config_flow.RadarrClient.async_try_zeroconf",
return_value=("v3", API_KEY, "/test"),
):
result = await hass.config_entries.flow.async_init(
DOMAIN,

View File

@@ -62,12 +62,4 @@ MOCK_VEHICLES = {
"pressure": "pressure.1.json",
},
},
"megane_e_tech": {
"endpoints": {
"battery_status": "battery_status_charging.json",
"cockpit": "cockpit_ev.json",
"hvac_status": "hvac_status.1.json",
"location": "location.json",
},
},
}

View File

@@ -1,219 +0,0 @@
{
"accountId": "account-id-1",
"country": "FR",
"vehicleLinks": [
{
"brand": "RENAULT",
"vin": "VF1MEGANEETECHVIN",
"status": "ACTIVE",
"linkType": "OWNER",
"garageBrand": "renault",
"startDate": "2024-01-16",
"createdDate": "2024-01-16T13:31:27.089634Z",
"lastModifiedDate": "2024-01-17T18:15:38.607328Z",
"ownershipStartDate": "2024-01-16",
"connectedDriver": {
"role": "MAIN_DRIVER",
"createdDate": "2024-01-17T18:15:38.607044265Z",
"lastModifiedDate": "2024-01-17T18:15:38.607044265Z"
},
"vehicleDetails": {
"vin": "VF1MEGANEETECHVIN",
"registrationDate": "2024-01-16",
"firstRegistrationDate": "2024-01-16",
"engineType": "6AM",
"engineRatio": "402",
"modelSCR": "ZO1",
"passToSalesDate": "2023-04-04",
"deliveryCountry": {
"code": "FR",
"label": "FRANCE"
},
"family": {
"code": "XCB",
"label": "XCB FAMILY",
"group": "007"
},
"tcu": {
"code": "AIVCT",
"label": "WITH AIVC CONNECTION UNIT",
"group": "E70"
},
"battery": {
"code": "BTBAE",
"label": "BTBAE BATTERY",
"group": "968"
},
"radioType": {
"code": "NA448",
"label": "IVI2 FULL PREM DAB",
"group": "425"
},
"registrationCountry": {
"code": "FR"
},
"brand": {
"label": "RENAULT"
},
"model": {
"code": "XCB1VE",
"label": "MEGANE E-TECH",
"group": "971"
},
"gearbox": {
"code": "1EVGB",
"label": "REDUCER FOR ELECTRIC MOTOR",
"group": "427"
},
"version": {
"code": "ICO2M J1 L"
},
"energy": {
"code": "ELECX",
"label": "ELECTRICITY",
"group": "019"
},
"bodyType": {
"code": "BCB",
"label": "BERLINE FOR XCB",
"group": "008"
},
"steeringSide": {
"code": "LHDG",
"label": "LEFT-HAND DRIVE",
"group": "027"
},
"additionalEngineType": {
"code": "NOATY",
"label": "WITHOUT ADDITIONAL ENGINE TYPE",
"group": "948"
},
"hybridation": {
"code": "NOHYB",
"label": "NO HYBRIDISATION LEVEL",
"group": "956"
},
"registrationNumber": "REG-MEG-0",
"vcd": "PAVEH/XCB/BCB/EA4/J1/ELECX/LHDG/TEMP/2WDRV/BEMBK/ACC02/00ABS/ACD03/STDRF/HTRWI/WFURP/CLK00/RVX07/1RVLG/FFGL2/SDLGT/RAL20/FSBAJ/SPADP/FAB02/NOCNV/LRSCO/LRS02/HAR04/RHR03/FSE06/RSE00/BIXPA/NTIBC/KMETR/TPRM2/SDSGL/NOSTK/SABG5/LEDCO/ESCHS/PALAW/SPBDA/M3CA3/PRROP/DB4C0/NOAGR/LRSW0/OSEWA/RVICM/TRSV0/NBRVX/FWL1T/RWL1T/NOOSW/REPKT/HTS02/00NLD/BRA03/AJSW2/HSTPL/SBR05/RMSB3/NA448/1EVGB/ASOC2/EVAU2/RIM09/TYSUM/ISOFI/EPER0/HR11M/SLCCA/NOATD/CPTC0/CHGS4/TL01A/BDPRO/NOADT/AIRBDE/PRUPTA/ELC1/NOETC/NOLSV/NOFEX/M2021/PHAS1/NOLTD/NOATY/NOHYB/60K0B/BTBAE/VEC151/XCB1VE/NB003/6AM/SFANT/ADR00/LKA05/PSFT0/BIHT0/NODUP/NOWAP/NOCCH/AMLT0/DRL02/RCALL/NOART/TBI00/MET05/BSD02/ECMD0/NRCAR/NOM2C/AIVCT/GSI00/TPNNP/TSGNE/2BCOL/ITP14/MDMOD/PXA00/NOPXB/PIG02/HTSW0/DAALT/WICH0/EV1GA1/SMOSP/NOWMC/FCOWA/C1AHS/NOPRA/VSPTA/1234Y/NOLIE/NOLII/NOWFI/AEB09/WOSRE/PRAHL/SPMIR/AVCAM/RAEB2/DTRNI",
"manufacturingDate": "2023-04-04",
"assets": [
{
"assetType": "PICTURE",
"viewpoint": "mybrand_2",
"renditions": [
{
"resolutionType": "ONE_MYRENAULT_SMALL",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=RSITE&bookmark=EXT_34_DESSUS&profile=HELIOS_OWNERSERVICES_SMALL_V2"
},
{
"resolutionType": "ONE_MYRENAULT_LARGE",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=RSITE&bookmark=EXT_34_DESSUS&profile=HELIOS_OWNERSERVICES_LARGE"
}
],
"viewPointInLowerCase": "mybrand_2"
},
{
"assetType": "PICTURE",
"viewpoint": "mybrand_5",
"renditions": [
{
"resolutionType": "ONE_MYRENAULT_SMALL",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=RSITE&bookmark=EXT_34_AV&profile=HELIOS_OWNERSERVICES_SMALL_V2"
},
{
"resolutionType": "ONE_MYRENAULT_LARGE",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=RSITE&bookmark=EXT_34_AV&profile=HELIOS_OWNERSERVICES_LARGE"
}
],
"viewPointInLowerCase": "mybrand_5"
},
{
"assetType": "PICTURE",
"viewpoint": "myb_car_selector",
"renditions": [
{
"resolutionType": "ONE_MYRENAULT_SMALL",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=RSITE&bookmark=EXT_34_AV&profile=HELIOS_OWNERSERVICES_SMALL_V2"
},
{
"resolutionType": "ONE_MYRENAULT_LARGE",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=RSITE&bookmark=EXT_34_AV&profile=HELIOS_OWNERSERVICES_LARGE"
}
],
"viewPointInLowerCase": "myb_car_selector"
},
{
"assetType": "PICTURE",
"viewpoint": "myb_car_page_dashboard",
"renditions": [
{
"resolutionType": "ONE_MYRENAULT_SMALL",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_LEFT_SIDE&profile=HELIOS_OWNERSERVICES_SMALL_V2"
},
{
"resolutionType": "ONE_MYRENAULT_LARGE",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_LEFT_SIDE&profile=HELIOS_OWNERSERVICES_LARGE"
}
],
"viewPointInLowerCase": "myb_car_page_dashboard"
},
{
"assetType": "PICTURE",
"viewpoint": "myb_program_settings_page",
"renditions": [
{
"resolutionType": "ONE_MYRENAULT_SMALL",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_LEFT_SIDE&profile=HELIOS_OWNERSERVICES_SMALL_V2"
},
{
"resolutionType": "ONE_MYRENAULT_LARGE",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_LEFT_SIDE&profile=HELIOS_OWNERSERVICES_LARGE"
}
],
"viewPointInLowerCase": "myb_program_settings_page"
},
{
"assetType": "PICTURE",
"viewpoint": "myb_plug_and_charge_activation",
"renditions": [
{
"resolutionType": "ONE_MYRENAULT_SMALL",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_RIGHT_SIDE&profile=HELIOS_OWNERSERVICES_SMALL_V2"
},
{
"resolutionType": "ONE_MYRENAULT_LARGE",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_RIGHT_SIDE&profile=HELIOS_OWNERSERVICES_LARGE"
}
],
"viewPointInLowerCase": "myb_plug_and_charge_activation"
},
{
"assetType": "PICTURE",
"viewpoint": "myb_plug_and_charge_my_car",
"renditions": [
{
"resolutionType": "ONE_MYRENAULT_SMALL",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_LEFT_SIDE&profile=HELIOS_OWNERSERVICES_SMALL_V2"
},
{
"resolutionType": "ONE_MYRENAULT_LARGE",
"url": "https://3dv.renault.com/ImageFromBookmark?configuration=BCB%2FEA4%2FLHDG%2FACD03%2FSTDRF%2FWFURP%2FRVX07%2FRAL20%2FLRS02%2FFSE06%2FBIXPA%2FLEDCO%2FPALAW%2FSPBDA%2FLRSW0%2FRVICM%2FTRSV0%2FAJSW2%2FNA448%2FASOC2%2FRIM09%2FSLCCA%2FNOATD%2FCPTC0%2FBDPRO%2FAIRBDE%2FPRUPTA%2FNOETC%2FM2021%2FNB003%2FSFANT%2FPSFT0%2FNODUP%2FNOWAP%2FRCALL%2FBSD02%2F2BCOL%2FITP14%2FMDMOD%2FPXA00%2FNOPXB%2FPIG02%2FNOLII%2FAVCAM%2FDTRNI&databaseId=a7cc2a21-d3fe-43bf-8643-14d3b8f9b2fa&bookmarkSet=CARPICKER&bookmark=EXT_LEFT_SIDE&profile=HELIOS_OWNERSERVICES_LARGE"
}
],
"viewPointInLowerCase": "myb_plug_and_charge_my_car"
}
],
"yearsOfMaintenance": 12,
"connectivityTechnology": "OPENRLINK",
"easyConnectStore": true,
"electrical": true,
"deliveryDate": "2024-01-16",
"retrievedFromDhs": false,
"engineEnergyType": "ELEC",
"radioCode": "",
"premiumSubscribed": false,
"batteryType": "NMC"
}
}
]
}

View File

@@ -495,155 +495,6 @@
'state': 'on',
})
# ---
# name: test_binary_sensors[megane_e_tech][binary_sensor.reg_meg_0_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.reg_meg_0_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Charging',
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.BATTERY_CHARGING: 'battery_charging'>,
'original_icon': None,
'original_name': 'Charging',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': 'vf1meganeetechvin_charging',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[megane_e_tech][binary_sensor.reg_meg_0_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery_charging',
'friendly_name': 'REG-MEG-0 Charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.reg_meg_0_charging',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[megane_e_tech][binary_sensor.reg_meg_0_hvac-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.reg_meg_0_hvac',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'HVAC',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'HVAC',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'hvac_status',
'unique_id': 'vf1meganeetechvin_hvac_status',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[megane_e_tech][binary_sensor.reg_meg_0_hvac-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'REG-MEG-0 HVAC',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.reg_meg_0_hvac',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[megane_e_tech][binary_sensor.reg_meg_0_plug-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.reg_meg_0_plug',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Plug',
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PLUG: 'plug'>,
'original_icon': None,
'original_name': 'Plug',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': 'vf1meganeetechvin_plugged_in',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[megane_e_tech][binary_sensor.reg_meg_0_plug-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'plug',
'friendly_name': 'REG-MEG-0 Plug',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.reg_meg_0_plug',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[twingo_3_electric][binary_sensor.reg_twingo_iii_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -1371,202 +1371,6 @@
'state': 'unknown',
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_flash_lights-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.reg_meg_0_flash_lights',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Flash lights',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Flash lights',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'flash_lights',
'unique_id': 'vf1meganeetechvin_flash_lights',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_flash_lights-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'REG-MEG-0 Flash lights',
}),
'context': <ANY>,
'entity_id': 'button.reg_meg_0_flash_lights',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_sound_horn-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.reg_meg_0_sound_horn',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Sound horn',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Sound horn',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'sound_horn',
'unique_id': 'vf1meganeetechvin_sound_horn',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_sound_horn-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'REG-MEG-0 Sound horn',
}),
'context': <ANY>,
'entity_id': 'button.reg_meg_0_sound_horn',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_start_air_conditioner-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.reg_meg_0_start_air_conditioner',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Start air conditioner',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Start air conditioner',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'start_air_conditioner',
'unique_id': 'vf1meganeetechvin_start_air_conditioner',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_start_air_conditioner-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'REG-MEG-0 Start air conditioner',
}),
'context': <ANY>,
'entity_id': 'button.reg_meg_0_start_air_conditioner',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_start_charge-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.reg_meg_0_start_charge',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Start charge',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Start charge',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'start_charge',
'unique_id': 'vf1meganeetechvin_start_charge',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[megane_e_tech][button.reg_meg_0_start_charge-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'REG-MEG-0 Start charge',
}),
'context': <ANY>,
'entity_id': 'button.reg_meg_0_start_charge',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[twingo_3_electric][button.reg_twingo_iii_flash_lights-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -204,59 +204,6 @@
'state': 'not_home',
})
# ---
# name: test_device_trackers[megane_e_tech][device_tracker.reg_meg_0_location-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'device_tracker',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'device_tracker.reg_meg_0_location',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Location',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Location',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'location',
'unique_id': 'vf1meganeetechvin_location',
'unit_of_measurement': None,
})
# ---
# name: test_device_trackers[megane_e_tech][device_tracker.reg_meg_0_location-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'REG-MEG-0 Location',
'gps_accuracy': 0,
'latitude': 48.1234567,
'longitude': 11.1234567,
'source_type': <SourceType.GPS: 'gps'>,
}),
'context': <ANY>,
'entity_id': 'device_tracker.reg_meg_0_location',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'not_home',
})
# ---
# name: test_device_trackers[twingo_3_electric][device_tracker.reg_twingo_iii_location-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -65,39 +65,6 @@
}),
])
# ---
# name: test_device_registry[megane_e_tech]
list([
DeviceRegistryEntrySnapshot({
'area_id': None,
'config_entries': <ANY>,
'config_entries_subentries': <ANY>,
'configuration_url': None,
'connections': set({
}),
'disabled_by': None,
'entry_type': None,
'hw_version': None,
'id': <ANY>,
'identifiers': set({
tuple(
'renault',
'VF1MEGANEETECHVIN',
),
}),
'labels': set({
}),
'manufacturer': 'Renault',
'model': 'Megane e-tech',
'model_id': 'XCB1VE',
'name': 'REG-MEG-0',
'name_by_user': None,
'primary_config_entry': <ANY>,
'serial_number': None,
'sw_version': None,
'via_device_id': None,
}),
])
# ---
# name: test_device_registry[twingo_3_electric]
list([
DeviceRegistryEntrySnapshot({

View File

@@ -2758,795 +2758,6 @@
'state': 'plugged',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_admissible_charging_power-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_admissible_charging_power',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Admissible charging power',
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.POWER: 'power'>,
'original_icon': None,
'original_name': 'Admissible charging power',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'admissible_charging_power',
'unique_id': 'vf1meganeetechvin_charging_power',
'unit_of_measurement': <UnitOfPower.KILO_WATT: 'kW'>,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_admissible_charging_power-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'power',
'friendly_name': 'REG-MEG-0 Admissible charging power',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfPower.KILO_WATT: 'kW'>,
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_admissible_charging_power',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '27.0',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_battery',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Battery',
'options': dict({
}),
'original_device_class': <SensorDeviceClass.BATTERY: 'battery'>,
'original_icon': None,
'original_name': 'Battery',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': 'vf1meganeetechvin_battery_level',
'unit_of_measurement': '%',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery',
'friendly_name': 'REG-MEG-0 Battery',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_battery',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '60',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery_autonomy-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_battery_autonomy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Battery autonomy',
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.DISTANCE: 'distance'>,
'original_icon': None,
'original_name': 'Battery autonomy',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'battery_autonomy',
'unique_id': 'vf1meganeetechvin_battery_autonomy',
'unit_of_measurement': <UnitOfLength.KILOMETERS: 'km'>,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery_autonomy-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'distance',
'friendly_name': 'REG-MEG-0 Battery autonomy',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfLength.KILOMETERS: 'km'>,
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_battery_autonomy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '141',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery_available_energy-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_battery_available_energy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Battery available energy',
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
'original_icon': None,
'original_name': 'Battery available energy',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'battery_available_energy',
'unique_id': 'vf1meganeetechvin_battery_available_energy',
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery_available_energy-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'REG-MEG-0 Battery available energy',
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_battery_available_energy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '31',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery_temperature-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_battery_temperature',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Battery temperature',
'options': dict({
'sensor': dict({
'suggested_display_precision': 1,
}),
}),
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
'original_icon': None,
'original_name': 'Battery temperature',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'battery_temperature',
'unique_id': 'vf1meganeetechvin_battery_temperature',
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_battery_temperature-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'temperature',
'friendly_name': 'REG-MEG-0 Battery temperature',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_battery_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '20',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_charge_state-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
'not_in_charge',
'waiting_for_a_planned_charge',
'charge_ended',
'waiting_for_current_charge',
'energy_flap_opened',
'charge_in_progress',
'charge_error',
'unavailable',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_charge_state',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Charge state',
'options': dict({
}),
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Charge state',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'charge_state',
'unique_id': 'vf1meganeetechvin_charge_state',
'unit_of_measurement': None,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_charge_state-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'REG-MEG-0 Charge state',
'options': list([
'not_in_charge',
'waiting_for_a_planned_charge',
'charge_ended',
'waiting_for_current_charge',
'energy_flap_opened',
'charge_in_progress',
'charge_error',
'unavailable',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_charge_state',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'charge_in_progress',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_charging_remaining_time-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_charging_remaining_time',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Charging remaining time',
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.DURATION: 'duration'>,
'original_icon': None,
'original_name': 'Charging remaining time',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'charging_remaining_time',
'unique_id': 'vf1meganeetechvin_charging_remaining_time',
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_charging_remaining_time-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'duration',
'friendly_name': 'REG-MEG-0 Charging remaining time',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_charging_remaining_time',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '145',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_hvac_soc_threshold-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_hvac_soc_threshold',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'HVAC SoC threshold',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'HVAC SoC threshold',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'hvac_soc_threshold',
'unique_id': 'vf1meganeetechvin_hvac_soc_threshold',
'unit_of_measurement': '%',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_hvac_soc_threshold-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'REG-MEG-0 HVAC SoC threshold',
'unit_of_measurement': '%',
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_hvac_soc_threshold',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_last_battery_activity-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_last_battery_activity',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Last battery activity',
'options': dict({
}),
'original_device_class': <SensorDeviceClass.TIMESTAMP: 'timestamp'>,
'original_icon': None,
'original_name': 'Last battery activity',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'battery_last_activity',
'unique_id': 'vf1meganeetechvin_battery_last_activity',
'unit_of_measurement': None,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_last_battery_activity-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'timestamp',
'friendly_name': 'REG-MEG-0 Last battery activity',
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_last_battery_activity',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '2020-01-12T21:40:16+00:00',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_last_hvac_activity-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_last_hvac_activity',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Last HVAC activity',
'options': dict({
}),
'original_device_class': <SensorDeviceClass.TIMESTAMP: 'timestamp'>,
'original_icon': None,
'original_name': 'Last HVAC activity',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'hvac_last_activity',
'unique_id': 'vf1meganeetechvin_hvac_last_activity',
'unit_of_measurement': None,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_last_hvac_activity-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'timestamp',
'friendly_name': 'REG-MEG-0 Last HVAC activity',
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_last_hvac_activity',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_last_location_activity-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_last_location_activity',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Last location activity',
'options': dict({
}),
'original_device_class': <SensorDeviceClass.TIMESTAMP: 'timestamp'>,
'original_icon': None,
'original_name': 'Last location activity',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'location_last_activity',
'unique_id': 'vf1meganeetechvin_location_last_activity',
'unit_of_measurement': None,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_last_location_activity-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'timestamp',
'friendly_name': 'REG-MEG-0 Last location activity',
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_last_location_activity',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '2020-02-18T16:58:38+00:00',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_mileage-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_mileage',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Mileage',
'options': dict({
'sensor': dict({
'suggested_display_precision': 2,
}),
}),
'original_device_class': <SensorDeviceClass.DISTANCE: 'distance'>,
'original_icon': None,
'original_name': 'Mileage',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'mileage',
'unique_id': 'vf1meganeetechvin_mileage',
'unit_of_measurement': <UnitOfLength.KILOMETERS: 'km'>,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_mileage-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'distance',
'friendly_name': 'REG-MEG-0 Mileage',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'unit_of_measurement': <UnitOfLength.KILOMETERS: 'km'>,
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_mileage',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '49114',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_outside_temperature-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_outside_temperature',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Outside temperature',
'options': dict({
'sensor': dict({
'suggested_display_precision': 1,
}),
}),
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
'original_icon': None,
'original_name': 'Outside temperature',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'outside_temperature',
'unique_id': 'vf1meganeetechvin_outside_temperature',
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_outside_temperature-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'temperature',
'friendly_name': 'REG-MEG-0 Outside temperature',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_outside_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '8.0',
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_plug_state-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
'unplugged',
'plugged',
'plugged_waiting_for_charge',
'plug_error',
'plug_unknown',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.reg_meg_0_plug_state',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Plug state',
'options': dict({
}),
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Plug state',
'platform': 'renault',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'plug_state',
'unique_id': 'vf1meganeetechvin_plug_state',
'unit_of_measurement': None,
})
# ---
# name: test_sensors[megane_e_tech][sensor.reg_meg_0_plug_state-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'REG-MEG-0 Plug state',
'options': list([
'unplugged',
'plugged',
'plugged_waiting_for_charge',
'plug_error',
'plug_unknown',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.reg_meg_0_plug_state',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'plugged',
})
# ---
# name: test_sensors[twingo_3_electric][sensor.reg_twingo_iii_admissible_charging_power-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -264,9 +264,7 @@ async def test_ssdp_discovery(
async def test_options_flow(
hass: HomeAssistant,
mock_setup_entry: None,
mock_config_entry: MockConfigEntry,
hass: HomeAssistant, mock_config_entry: MockConfigEntry
) -> None:
"""Test options config flow."""
mock_config_entry.add_to_hass(hass)

View File

@@ -31,8 +31,7 @@ async def test_setup_success_no_region(hass: HomeAssistant) -> None:
)
mock_config.add_to_hass(hass)
with patch("homeassistant.components.sharkiq.async_setup_entry", return_value=True):
result = await async_setup_component(hass=hass, domain=DOMAIN, config={})
result = await async_setup_component(hass=hass, domain=DOMAIN, config={})
assert result is True

View File

@@ -149,9 +149,7 @@ async def test_dhcp_discovery(
async def test_dhcp_already_configured(
hass: HomeAssistant,
mock_config_entry: MockConfigEntry,
mock_setup_entry: AsyncMock,
hass: HomeAssistant, mock_config_entry: MockConfigEntry
) -> None:
"""Test starting a flow by dhcp when already configured."""
mock_config_entry.add_to_hass(hass)
@@ -164,9 +162,7 @@ async def test_dhcp_already_configured(
async def test_dhcp_already_configured_duplicate(
hass: HomeAssistant,
mock_config_entry: MockConfigEntry,
mock_sma_client: MagicMock,
hass: HomeAssistant, mock_config_entry: MockConfigEntry
) -> None:
"""Test starting a flow by DHCP when already configured and MAC is added."""
mock_config_entry.add_to_hass(hass)
@@ -284,7 +280,6 @@ async def test_full_flow_reauth(
async def test_reauth_flow_exceptions(
hass: HomeAssistant,
mock_config_entry: MockConfigEntry,
mock_setup_entry: AsyncMock,
exception: Exception,
error: str,
) -> None:

View File

@@ -10780,7 +10780,6 @@
'after',
'cleaning',
'pause',
'washing_mop',
]),
}),
'config_entry_id': <ANY>,
@@ -10829,7 +10828,6 @@
'after',
'cleaning',
'pause',
'washing_mop',
]),
}),
'context': <ANY>,
@@ -11154,7 +11152,6 @@
'after',
'cleaning',
'pause',
'washing_mop',
]),
}),
'config_entry_id': <ANY>,
@@ -11203,7 +11200,6 @@
'after',
'cleaning',
'pause',
'washing_mop',
]),
}),
'context': <ANY>,

View File

@@ -244,55 +244,6 @@
'state': 'on',
})
# ---
# name: test_all_entities[da_ks_hood_01001][switch.range_hood_do_not_disturb-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.range_hood_do_not_disturb',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Do not disturb',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Do not disturb',
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'do_not_disturb',
'unique_id': 'fa5fca25-fa7a-1807-030a-2f72ee0f7bff_main_custom.doNotDisturbMode_doNotDisturb_doNotDisturb',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_ks_hood_01001][switch.range_hood_do_not_disturb-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Range hood Do not disturb',
}),
'context': <ANY>,
'entity_id': 'switch.range_hood_do_not_disturb',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_all_entities[da_ks_walloven_0107x][switch.four_sabbath_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
@@ -1028,55 +979,6 @@
'state': 'on',
})
# ---
# name: test_all_entities[da_rvc_map_01011][switch.robot_vacuum_do_not_disturb-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'switch.robot_vacuum_do_not_disturb',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Do not disturb',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Do not disturb',
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'do_not_disturb',
'unique_id': '05accb39-2017-c98b-a5ab-04a81f4d3d9a_main_custom.doNotDisturbMode_doNotDisturb_doNotDisturb',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_rvc_map_01011][switch.robot_vacuum_do_not_disturb-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Robot vacuum Do not disturb',
}),
'context': <ANY>,
'entity_id': 'switch.robot_vacuum_do_not_disturb',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_all_entities[da_rvc_normal_000001][switch.robot_vacuum-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

View File

@@ -7,16 +7,6 @@ import pytest
from . import MOCK_SERVERS
@pytest.fixture
def mock_setup_entry():
"""Mock setting up a config entry."""
with patch(
"homeassistant.components.speedtestdotnet.async_setup_entry",
return_value=True,
) as mock_setup:
yield mock_setup
@pytest.fixture
def mock_api():
"""Mock entry setup."""

View File

@@ -14,7 +14,7 @@ from homeassistant.data_entry_flow import FlowResultType
from tests.common import MockConfigEntry
async def test_flow_works(hass: HomeAssistant, mock_setup_entry: MagicMock) -> None:
async def test_flow_works(hass: HomeAssistant) -> None:
"""Test user config."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}

View File

@@ -25,15 +25,12 @@ async def test_flow_user(hass: HomeAssistant) -> None:
assert result["step_id"] == "user"
assert result["errors"] == {}
with (
patch_config_flow_tautulli(AsyncMock()),
patch("homeassistant.components.tautulli.async_setup_entry", return_value=True),
):
with patch_config_flow_tautulli(AsyncMock()):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input=CONF_DATA,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == NAME
@@ -51,15 +48,12 @@ async def test_flow_user_cannot_connect(hass: HomeAssistant) -> None:
assert result["step_id"] == "user"
assert result["errors"]["base"] == "cannot_connect"
with (
patch_config_flow_tautulli(AsyncMock()),
patch("homeassistant.components.tautulli.async_setup_entry", return_value=True),
):
with patch_config_flow_tautulli(AsyncMock()):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input=CONF_DATA,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == NAME
@@ -77,15 +71,12 @@ async def test_flow_user_invalid_auth(hass: HomeAssistant) -> None:
assert result["step_id"] == "user"
assert result["errors"]["base"] == "invalid_auth"
with (
patch_config_flow_tautulli(AsyncMock()),
patch("homeassistant.components.tautulli.async_setup_entry", return_value=True),
):
with patch_config_flow_tautulli(AsyncMock()):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input=CONF_DATA,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == NAME
@@ -103,15 +94,12 @@ async def test_flow_user_unknown_error(hass: HomeAssistant) -> None:
assert result["step_id"] == "user"
assert result["errors"]["base"] == "unknown"
with (
patch_config_flow_tautulli(AsyncMock()),
patch("homeassistant.components.tautulli.async_setup_entry", return_value=True),
):
with patch_config_flow_tautulli(AsyncMock()):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input=CONF_DATA,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == NAME
@@ -150,15 +138,12 @@ async def test_flow_user_multiple_entries_allowed(hass: HomeAssistant) -> None:
CONF_API_KEY: "efgh",
CONF_VERIFY_SSL: True,
}
with (
patch_config_flow_tautulli(AsyncMock()),
patch("homeassistant.components.tautulli.async_setup_entry", return_value=True),
):
with patch_config_flow_tautulli(AsyncMock()):
result2 = await hass.config_entries.flow.async_configure(
result["flow_id"],
user_input=user_input,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == NAME

View File

@@ -57,8 +57,6 @@ async def test_service_reconnect_client(
async def test_service_reconnect_failed_with_invalid_entry(
hass: HomeAssistant,
mock_omada_site_client: MagicMock,
mock_omada_client: MagicMock,
mock_config_entry: MockConfigEntry,
) -> None:
"""Test reconnect with invalid config entry raises ServiceValidationError."""
@@ -104,8 +102,6 @@ async def test_service_reconnect_without_config_entry_id(
async def test_service_reconnect_entry_not_loaded(
hass: HomeAssistant,
mock_omada_site_client: MagicMock,
mock_omada_client: MagicMock,
mock_config_entry: MockConfigEntry,
) -> None:
"""Test reconnect service raises error when entry is not loaded."""

View File

@@ -30,7 +30,6 @@ from tests.common import MockConfigEntry, async_fire_time_changed
async def test_config_flow_entry_migrate_1_1_to_1_2(
hass: HomeAssistant,
mock_transmission_client: AsyncMock,
) -> None:
"""Test that config flow entry is migrated correctly from v1.1 to v1.2."""
entry = MockConfigEntry(
@@ -151,7 +150,6 @@ async def test_unload_entry(
)
async def test_migrate_unique_id(
hass: HomeAssistant,
mock_transmission_client: AsyncMock,
entity_registry: er.EntityRegistry,
domain: str,
old_unique_id: str,

View File

@@ -153,9 +153,12 @@ async def test_reboot_gateway_service_raises_on_exception(
async def test_reboot_gateway_service_raises_validation_error(
hass: HomeAssistant,
hass: HomeAssistant, mock_config_entry: MockConfigEntry
) -> None:
"""Test that reboot_gateway service raises ServiceValidationError when no gateway is loaded."""
# Add the config entry but don't set it up
mock_config_entry.add_to_hass(hass)
# Set up the velux integration's async_setup to register the service
await async_setup_component(hass, DOMAIN, {})
await hass.async_block_till_done()

View File

@@ -159,10 +159,9 @@ async def test_full_ssdp_flow_implementation(hass: HomeAssistant) -> None:
"components": "light",
}
with patch("homeassistant.components.wilight.async_setup_entry", return_value=True):
result = await hass.config_entries.flow.async_configure(
result["flow_id"], user_input={}
)
result = await hass.config_entries.flow.async_configure(
result["flow_id"], user_input={}
)
assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == f"WL{WILIGHT_ID}"