44import logging
55from typing import cast
66
7- import aiohttp
7+ from aiohttp import ClientResponseError
88import voluptuous as vol
99
1010from homeassistant .const import ATTR_DEVICE_ID , ATTR_TEMPERATURE
@@ -107,7 +107,7 @@ async def set_program(call: ServiceCall) -> None:
107107 data = {"programId" : call .data [ATTR_PROGRAM_ID ]}
108108 try :
109109 await api .set_program (serial_number , data )
110- except aiohttp . ClientResponseError as ex :
110+ except ClientResponseError as ex :
111111 raise HomeAssistantError (
112112 translation_domain = DOMAIN ,
113113 translation_key = "set_program_error" ,
@@ -137,7 +137,7 @@ async def set_program_oven(call: ServiceCall) -> None:
137137 data ["temperature" ] = call .data [ATTR_TEMPERATURE ]
138138 try :
139139 await api .set_program (serial_number , data )
140- except aiohttp . ClientResponseError as ex :
140+ except ClientResponseError as ex :
141141 raise HomeAssistantError (
142142 translation_domain = DOMAIN ,
143143 translation_key = "set_program_oven_error" ,
@@ -157,7 +157,7 @@ async def get_programs(call: ServiceCall) -> ServiceResponse:
157157
158158 try :
159159 programs = await api .get_programs (serial_number )
160- except aiohttp . ClientResponseError as ex :
160+ except ClientResponseError as ex :
161161 raise HomeAssistantError (
162162 translation_domain = DOMAIN ,
163163 translation_key = "get_programs_error" ,
0 commit comments