mirror of
https://github.com/esphome/esphome.git
synced 2025-09-17 10:42:21 +01:00
fixes
This commit is contained in:
@@ -480,9 +480,9 @@ async def to_code(config: ConfigType) -> None:
|
|||||||
cg.add_define("USE_AREAS")
|
cg.add_define("USE_AREAS")
|
||||||
|
|
||||||
# Handle area configuration
|
# Handle area configuration
|
||||||
area_hashes = dict[int, str] = {}
|
area_hashes: dict[int, str] = {}
|
||||||
area_ids = set[str] = set()
|
area_ids: set[str] = set()
|
||||||
device_hashes = dict[int, str] = {}
|
device_hashes: dict[int, str] = {}
|
||||||
area_conf: dict[str, str] | str | None
|
area_conf: dict[str, str] | str | None
|
||||||
if area_conf := config.get(CONF_AREA):
|
if area_conf := config.get(CONF_AREA):
|
||||||
if isinstance(area_conf, dict):
|
if isinstance(area_conf, dict):
|
||||||
@@ -524,7 +524,7 @@ async def to_code(config: ConfigType) -> None:
|
|||||||
cg.add(cg.RawStatement(f"App.reserve_device({len(devices)});"))
|
cg.add(cg.RawStatement(f"App.reserve_device({len(devices)});"))
|
||||||
cg.add_define("USE_DEVICES")
|
cg.add_define("USE_DEVICES")
|
||||||
|
|
||||||
# Process additional areas
|
# Process additional areas from the areas list
|
||||||
areas: list[dict[str, str]]
|
areas: list[dict[str, str]]
|
||||||
if areas := config[CONF_AREAS]:
|
if areas := config[CONF_AREAS]:
|
||||||
for area_conf in areas:
|
for area_conf in areas:
|
||||||
|
Reference in New Issue
Block a user