Prepare MQTT common tests part4 (#90023)
* Upd test_setting_attribute_via_mqtt_json_message * Update test_setting_attribute_with_template * Update test_update_with_json_attrs_not_dict * Update test_update_with_json_attrs_bad_json
This commit is contained in:
parent
dd1700954b
commit
fe49861e26
21 changed files with 168 additions and 171 deletions
|
@ -641,12 +641,12 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
alarm_control_panel.DOMAIN,
|
alarm_control_panel.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
)
|
)
|
||||||
|
@ -666,12 +666,12 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
alarm_control_panel.DOMAIN,
|
alarm_control_panel.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
)
|
)
|
||||||
|
@ -679,13 +679,13 @@ async def test_setting_attribute_with_template(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
alarm_control_panel.DOMAIN,
|
alarm_control_panel.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -694,13 +694,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
alarm_control_panel.DOMAIN,
|
alarm_control_panel.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -716,24 +716,21 @@ async def test_off_delay(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass,
|
hass, mqtt_mock_entry_no_yaml_config, binary_sensor.DOMAIN, DEFAULT_CONFIG
|
||||||
mqtt_mock_entry_with_yaml_config,
|
|
||||||
binary_sensor.DOMAIN,
|
|
||||||
DEFAULT_CONFIG,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
binary_sensor.DOMAIN,
|
binary_sensor.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
)
|
)
|
||||||
|
@ -741,13 +738,13 @@ async def test_setting_attribute_with_template(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
binary_sensor.DOMAIN,
|
binary_sensor.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -756,13 +753,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
binary_sensor.DOMAIN,
|
binary_sensor.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -206,11 +206,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, button.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, button.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -224,23 +224,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, button.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, button.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
button.DOMAIN,
|
button.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -249,13 +249,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
button.DOMAIN,
|
button.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -196,11 +196,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, camera.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, camera.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,23 +218,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, camera.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, camera.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
camera.DOMAIN,
|
camera.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -243,13 +243,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
camera.DOMAIN,
|
camera.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -1487,11 +1487,11 @@ async def test_temperature_unit(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, climate.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, climate.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1509,23 +1509,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, climate.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, climate.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
climate.DOMAIN,
|
climate.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -1534,13 +1534,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
climate.DOMAIN,
|
climate.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -2591,11 +2591,11 @@ async def test_invalid_device_class(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, cover.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, cover.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -2613,23 +2613,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, cover.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, cover.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
cover.DOMAIN,
|
cover.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -2638,13 +2638,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
cover.DOMAIN,
|
cover.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -1708,11 +1708,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, fan.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, fan.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1730,23 +1730,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, fan.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, fan.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
fan.DOMAIN,
|
fan.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -1755,13 +1755,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
fan.DOMAIN,
|
fan.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -1061,11 +1061,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1083,23 +1083,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, humidifier.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
humidifier.DOMAIN,
|
humidifier.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -1108,13 +1108,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
humidifier.DOMAIN,
|
humidifier.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -670,11 +670,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
hass, mqtt_mock_entry_no_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -692,23 +692,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
hass, mqtt_mock_entry_no_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
vacuum.DOMAIN,
|
vacuum.DOMAIN,
|
||||||
DEFAULT_CONFIG_2,
|
DEFAULT_CONFIG_2,
|
||||||
|
@ -717,13 +717,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
vacuum.DOMAIN,
|
vacuum.DOMAIN,
|
||||||
DEFAULT_CONFIG_2,
|
DEFAULT_CONFIG_2,
|
||||||
|
|
|
@ -2172,11 +2172,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -2194,23 +2194,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
light.DOMAIN,
|
light.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -2219,13 +2219,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
light.DOMAIN,
|
light.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -1921,11 +1921,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1943,23 +1943,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
light.DOMAIN,
|
light.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -1968,13 +1968,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
light.DOMAIN,
|
light.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -889,11 +889,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -911,23 +911,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, light.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
light.DOMAIN,
|
light.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -936,13 +936,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
light.DOMAIN,
|
light.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -691,11 +691,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, lock.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, lock.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -713,23 +713,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, lock.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, lock.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
lock.DOMAIN,
|
lock.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -738,13 +738,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
lock.DOMAIN,
|
lock.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -484,11 +484,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, number.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, number.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -506,23 +506,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, number.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, number.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
number.DOMAIN,
|
number.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -531,13 +531,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
number.DOMAIN,
|
number.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -361,11 +361,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, select.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, select.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -383,23 +383,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, select.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, select.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
select.DOMAIN,
|
select.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -408,13 +408,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
select.DOMAIN,
|
select.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -868,11 +868,11 @@ async def test_valid_state_class(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, sensor.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, sensor.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -890,23 +890,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, sensor.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, sensor.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
sensor.DOMAIN,
|
sensor.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -915,13 +915,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
sensor.DOMAIN,
|
sensor.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -570,11 +570,11 @@ async def test_custom_state_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, siren.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, siren.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -588,23 +588,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, siren.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, siren.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
siren.DOMAIN,
|
siren.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -613,13 +613,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
siren.DOMAIN,
|
siren.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -407,11 +407,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
hass, mqtt_mock_entry_no_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -429,23 +429,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
hass, mqtt_mock_entry_no_yaml_config, vacuum.DOMAIN, DEFAULT_CONFIG_2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
vacuum.DOMAIN,
|
vacuum.DOMAIN,
|
||||||
DEFAULT_CONFIG_2,
|
DEFAULT_CONFIG_2,
|
||||||
|
@ -454,13 +454,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
vacuum.DOMAIN,
|
vacuum.DOMAIN,
|
||||||
DEFAULT_CONFIG_2,
|
DEFAULT_CONFIG_2,
|
||||||
|
|
|
@ -332,11 +332,11 @@ async def test_custom_state_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, switch.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, switch.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -350,23 +350,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, switch.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, switch.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
switch.DOMAIN,
|
switch.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -375,13 +375,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
switch.DOMAIN,
|
switch.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -383,11 +383,11 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, text.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, text.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -401,23 +401,23 @@ async def test_setting_blocked_attribute_via_mqtt_json_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, text.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, text.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
text.DOMAIN,
|
text.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -426,13 +426,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
text.DOMAIN,
|
text.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
|
@ -467,32 +467,32 @@ async def test_custom_availability_payload(
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_via_mqtt_json_message(
|
async def test_setting_attribute_via_mqtt_json_message(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_via_mqtt_json_message(
|
await help_test_setting_attribute_via_mqtt_json_message(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, update.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, update.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_setting_attribute_with_template(
|
async def test_setting_attribute_with_template(
|
||||||
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
|
hass: HomeAssistant, mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the setting of attribute via MQTT with JSON payload."""
|
"""Test the setting of attribute via MQTT with JSON payload."""
|
||||||
await help_test_setting_attribute_with_template(
|
await help_test_setting_attribute_with_template(
|
||||||
hass, mqtt_mock_entry_with_yaml_config, update.DOMAIN, DEFAULT_CONFIG
|
hass, mqtt_mock_entry_no_yaml_config, update.DOMAIN, DEFAULT_CONFIG
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def test_update_with_json_attrs_not_dict(
|
async def test_update_with_json_attrs_not_dict(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_not_dict(
|
await help_test_update_with_json_attrs_not_dict(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
update.DOMAIN,
|
update.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
@ -501,13 +501,13 @@ async def test_update_with_json_attrs_not_dict(
|
||||||
|
|
||||||
async def test_update_with_json_attrs_bad_json(
|
async def test_update_with_json_attrs_bad_json(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator,
|
mqtt_mock_entry_no_yaml_config: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test attributes get extracted from a JSON result."""
|
"""Test attributes get extracted from a JSON result."""
|
||||||
await help_test_update_with_json_attrs_bad_json(
|
await help_test_update_with_json_attrs_bad_json(
|
||||||
hass,
|
hass,
|
||||||
mqtt_mock_entry_with_yaml_config,
|
mqtt_mock_entry_no_yaml_config,
|
||||||
caplog,
|
caplog,
|
||||||
update.DOMAIN,
|
update.DOMAIN,
|
||||||
DEFAULT_CONFIG,
|
DEFAULT_CONFIG,
|
||||||
|
|
Loading…
Add table
Reference in a new issue