Add shelly ble scanner support (#82007)

This commit is contained in:
J. Nick Koston 2022-11-15 12:34:45 -06:00 committed by GitHub
parent 7932864e00
commit 435fc23737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 694 additions and 49 deletions

View file

@ -5,6 +5,10 @@ from logging import Logger, getLogger
import re
from typing import Final
from awesomeversion import AwesomeVersion
from homeassistant.backports.enum import StrEnum
DOMAIN: Final = "shelly"
LOGGER: Logger = getLogger(__package__)
@ -156,3 +160,15 @@ UPTIME_DEVIATION: Final = 5
ENTRY_RELOAD_COOLDOWN = 60
SHELLY_GAS_MODELS = ["SHGS-1"]
BLE_MIN_VERSION = AwesomeVersion("0.12.0-beta2")
CONF_BLE_SCANNER_MODE = "ble_scanner_mode"
class BLEScannerMode(StrEnum):
"""BLE scanner mode."""
DISABLED = "disabled"
ACTIVE = "active"
PASSIVE = "passive"