1818from homeassistant .helpers .entity import Entity
1919
2020from .providers import PROVIDERS
21- from .const import OUTFILE , CONF_NOTIFY , CONF_EXCLUDE , CONF_EXCLUDE_CLIENTS , CONF_PROVIDER , CONF_LOG_LOCATION , STARTUP
21+ from .const import (
22+ OUTFILE ,
23+ CONF_NOTIFY ,
24+ CONF_EXCLUDE ,
25+ CONF_EXCLUDE_CLIENTS ,
26+ CONF_PROVIDER ,
27+ CONF_LOG_LOCATION ,
28+ STARTUP ,
29+ )
2230
2331_LOGGER = logging .getLogger (__name__ )
2432
4250 vol .Optional (CONF_LOG_LOCATION , default = "" ): cv .string ,
4351 vol .Optional (CONF_NOTIFY , default = True ): cv .boolean ,
4452 vol .Optional (CONF_EXCLUDE , default = []): vol .All (cv .ensure_list , [cv .string ]),
45- vol .Optional (CONF_EXCLUDE_CLIENTS , default = []): vol .All (cv .ensure_list , [cv .string ]),
53+ vol .Optional (CONF_EXCLUDE_CLIENTS , default = []): vol .All (
54+ cv .ensure_list , [cv .string ]
55+ ),
4656 }
4757)
4858
@@ -62,12 +72,16 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
6272 exclude_clients = config .get (CONF_EXCLUDE_CLIENTS )
6373 hass .data [PLATFORM_NAME ] = {}
6474
65- if not load_authentications (hass .config .path (".storage/auth" ), exclude , exclude_clients ):
75+ if not load_authentications (
76+ hass .config .path (".storage/auth" ), exclude , exclude_clients
77+ ):
6678 return False
6779
6880 out = str (hass .config .path (OUTFILE ))
6981
70- sensor = AuthenticatedSensor (hass , notify , out , exclude , exclude_clients , config [CONF_PROVIDER ])
82+ sensor = AuthenticatedSensor (
83+ hass , notify , out , exclude , exclude_clients , config [CONF_PROVIDER ]
84+ )
7185 sensor .initial_run ()
7286
7387 add_devices ([sensor ], True )
0 commit comments