1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add encoding configuration setting to REST and Scape (#90254)

* Create new config parameter for default character encoding if no character encoding is declared

* Changes suggested by gjohansson-ST

* Added config flow for scape

* Removed "character"

* Change to create_async_httpx_client

* Remove CONF_ENCODING from Scrape SENSOR_SCHEMA

* Debug scrape test
This commit is contained in:
Olivier Ouellet
2023-03-28 06:42:31 -04:00
committed by GitHub
parent 3c3860c923
commit 1c465b5ad0
9 changed files with 67 additions and 12 deletions

View File

@@ -9,7 +9,13 @@ import pytest
from homeassistant.components.rest.data import DEFAULT_TIMEOUT
from homeassistant.components.rest.schema import DEFAULT_METHOD, DEFAULT_VERIFY_SSL
from homeassistant.components.scrape.const import CONF_INDEX, CONF_SELECT, DOMAIN
from homeassistant.components.scrape.const import (
CONF_ENCODING,
CONF_INDEX,
CONF_SELECT,
DEFAULT_ENCODING,
DOMAIN,
)
from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import (
CONF_METHOD,
@@ -38,6 +44,7 @@ async def get_config_to_integration_load() -> dict[str, Any]:
CONF_METHOD: DEFAULT_METHOD,
CONF_VERIFY_SSL: DEFAULT_VERIFY_SSL,
CONF_TIMEOUT: DEFAULT_TIMEOUT,
CONF_ENCODING: DEFAULT_ENCODING,
"sensor": [
{
CONF_NAME: "Current version",