How to use the aioesphomeapi.api_pb2.ClimateCommandRequest function in aioesphomeapi

To help you get started, we’ve selected a few aioesphomeapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esphome / aioesphomeapi / aioesphomeapi / client.py View on Github external
async def climate_command(self,
                              key: int,
                              mode: Optional[ClimateMode] = None,
                              target_temperature: Optional[float] = None,
                              target_temperature_low: Optional[float] = None,
                              target_temperature_high: Optional[float] = None,
                              away: Optional[bool] = None,
                              fan_mode: Optional[ClimateFanMode] = None,
                              swing_mode: Optional[ClimateSwingMode] = None,
                              ) -> None:
        self._check_authenticated()

        req = pb.ClimateCommandRequest()
        req.key = key
        if mode is not None:
            req.has_mode = True
            req.mode = mode
        if target_temperature is not None:
            req.has_target_temperature = True
            req.target_temperature = target_temperature
        if target_temperature_low is not None:
            req.has_target_temperature_low = True
            req.target_temperature_low = target_temperature_low
        if target_temperature_high is not None:
            req.has_target_temperature_high = True
            req.target_temperature_high = target_temperature_high
        if away is not None:
            req.has_away = True
            req.away = away
github esphome / aioesphomeapi / aioesphomeapi / core.py View on Github external
33: pb.SwitchCommandRequest,
    34: pb.SubscribeHomeassistantServicesRequest,
    35: pb.HomeassistantServiceResponse,
    36: pb.GetTimeRequest,
    37: pb.GetTimeResponse,
    38: pb.SubscribeHomeAssistantStatesRequest,
    39: pb.SubscribeHomeAssistantStateResponse,
    40: pb.HomeAssistantStateResponse,
    41: pb.ListEntitiesServicesResponse,
    42: pb.ExecuteServiceRequest,
    43: pb.ListEntitiesCameraResponse,
    44: pb.CameraImageResponse,
    45: pb.CameraImageRequest,
    46: pb.ListEntitiesClimateResponse,
    47: pb.ClimateStateResponse,
    48: pb.ClimateCommandRequest,
}