diff --git a/esphome/components/store_yaml/__init__.py b/esphome/components/store_yaml/__init__.py index 673ca1bb28..0ac2449755 100644 --- a/esphome/components/store_yaml/__init__.py +++ b/esphome/components/store_yaml/__init__.py @@ -11,6 +11,7 @@ import esphome.config_validation as cv from esphome.const import CONF_API, CONF_ID, CONF_RAW_DATA_ID from esphome.core import CORE, EsphomeError, HexInt import esphome.final_validate as fv +from esphome.types import ConfigType _LOGGER = logging.getLogger(__name__) @@ -43,7 +44,7 @@ CONFIG_SCHEMA = cv.Schema( ).extend(cv.COMPONENT_SCHEMA) -def _final_validate(config): +def _final_validate(config: ConfigType) -> ConfigType: """Require API encryption: an unauthenticated client could otherwise pull the embedded YAML (which may include Wi-Fi credentials or opted-in secrets). The escape hatch ``allow_unencrypted_api: true`` exists for @@ -145,7 +146,7 @@ def _pack_envelope(files: list[tuple[str, bytes]]) -> bytes: return b"".join(parts) -async def to_code(config): +async def to_code(config: ConfigType) -> None: cg.add_define("USE_STORE_YAML") zstd = _import_zstd() diff --git a/esphome/components/store_yaml/store_yaml.h b/esphome/components/store_yaml/store_yaml.h index 61f3b87e72..6455dadd23 100644 --- a/esphome/components/store_yaml/store_yaml.h +++ b/esphome/components/store_yaml/store_yaml.h @@ -15,7 +15,6 @@ class StoreYamlComponent : public Component { public: void setup() override; void dump_config() override; - float get_setup_priority() const override { return setup_priority::DATA; } // Called once from codegen with the PROGMEM blob. void set_data(const uint8_t *data, size_t size, size_t uncompressed_size) {