Improve sense timeout exception handling (#33127)
asyncio.Timeout needs to be trapped as well
This commit is contained in:
1 parent
0b2a8bf79a
commit
fa60e9b03b
4 files changed
+14
-11
No files matched your search
@@ -1,4 +1,9 @@
|
||||
"""Constants for monitoring a Sense energy sensor."""
|
||||
|
||||
import asyncio
|
||||
|
||||
from sense_energy import SenseAPITimeoutException
|
||||
|
||||
DOMAIN = "sense"
|
||||
DEFAULT_TIMEOUT = 10
|
||||
ACTIVE_UPDATE_RATE = 60
|
||||
@@ -18,6 +23,8 @@ PRODUCTION_ID = "production"
|
||||
|
||||
ICON = "mdi:flash"
|
||||
|
||||
SENSE_TIMEOUT_EXCEPTIONS = (asyncio.TimeoutError, SenseAPITimeoutException)
|
||||
|
||||
MDI_ICONS = {
|
||||
"ac": "air-conditioner",
|
||||
"aquarium": "fish",
|
||||
|
||||
Reference in new issue
Block a user