File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 4
4
import asyncio
5
5
from datetime import timedelta
6
6
import time
7
- from types import MappingProxyType
8
7
from typing import Any
9
8
10
9
from async_timeout import timeout
@@ -113,7 +112,7 @@ async def custom_sleep(delay: int) -> None:
113
112
start = time .time ()
114
113
try :
115
114
await asyncio .sleep (delay )
116
- except CancelledError :
115
+ except asyncio . CancelledError :
117
116
elapsed = time .time () - start
118
117
await asyncio .sleep (delay - elapsed )
119
118
Original file line number Diff line number Diff line change 1
1
"""C.M.I binary sensor platform."""
2
2
from __future__ import annotations
3
3
4
- import copy
5
4
from typing import Any
6
5
7
6
from homeassistant .components .binary_sensor import (
Original file line number Diff line number Diff line change 1
1
"""Parser to parse device data."""
2
2
from __future__ import annotations
3
+
3
4
from typing import Any
4
5
5
6
from homeassistant .const import CONF_API_VERSION , STATE_OFF , STATE_ON
6
- from ta_cmi import Channel , Device , ChannelType
7
+ from ta_cmi import Channel , ChannelType , Device
7
8
8
9
from .const import (
9
10
CONF_CHANNELS ,
12
13
CONF_CHANNELS_NAME ,
13
14
CONF_CHANNELS_TYPE ,
14
15
CONF_DEVICE_FETCH_MODE ,
15
- TYPE_BINARY ,
16
- TYPE_SENSOR ,
17
16
DEVICE_TYPE ,
18
17
DEVICE_TYPE_STRING_MAP ,
18
+ TYPE_BINARY ,
19
+ TYPE_SENSOR ,
19
20
)
20
21
21
22
You can’t perform that action at this time.
0 commit comments