diff --git a/src/main/core/container.py b/src/main/core/container.py index d036cfd..0c3f2b7 100644 --- a/src/main/core/container.py +++ b/src/main/core/container.py @@ -8,6 +8,7 @@ from main.temperature.water_heater_temperature_repository import IWaterHeaterTemperatureRepository, \ WaterHeaterTemperatureRepository from main.flame_size.flame_size_repository import IFlameSizeRepository, FlameSizeRepository +from main.summer_mode.summer_mode_repository import ISummerModeRepository, SummerModeRepository def container(binder: Binder) -> None: @@ -17,6 +18,7 @@ def container(binder: Binder) -> None: binder.bind(IHeatingTemperatureRepository, to=HeatingTemperatureRepository) # type: ignore[type-abstract] binder.bind(IStoveStateRepository, to=StoveStateRepository) # type: ignore[type-abstract] binder.bind(IFlameSizeRepository, to=FlameSizeRepository) # type: ignore[type-abstract] + binder.bind(ISummerModeRepository, to=SummerModeRepository) # type: ignore[type-abstract] binder.bind( Redis, to=Redis(host=configuration.redis_ip, port=configuration.redis_port, decode_responses=True) diff --git a/src/main/home_periscope.py b/src/main/home_periscope.py index 4836f4b..e956bb6 100644 --- a/src/main/home_periscope.py +++ b/src/main/home_periscope.py @@ -18,6 +18,7 @@ from main.stove_state.stove_state_controller import stove_state_router from main.temperature.temperature_controller import temperature_router from main.flame_size.flame_size_controller import flame_size_router +from main.summer_mode.summer_mode_controller import summer_mode_router from stove_connector.stream_stove_data import StreamStoveData configuration = Configuration() @@ -34,6 +35,7 @@ def __init__(self, configure: Callable[[Binder], None]): self.application.include_router(temperature_router) self.application.include_router(stove_state_router) self.application.include_router(flame_size_router) + self.application.include_router(summer_mode_router) self.application.state.injector = a_injector attach_injector(self.application, a_injector) if not configuration.features.demo_mode: diff --git a/src/main/temperature/temperature_controller.py b/src/main/temperature/temperature_controller.py index 5abbd94..fcf8940 100644 --- a/src/main/temperature/temperature_controller.py +++ b/src/main/temperature/temperature_controller.py @@ -1,7 +1,6 @@ from fastapi import Request from attrs import asdict -from fastapi.openapi.models import Response from fastapi_injector import Injected from fastapi_utils.cbv import cbv from fastapi_utils.inferring_router import InferringRouter