From 95a25c72dc363ad9240ae16bc8add225d1bc481c Mon Sep 17 00:00:00 2001 From: Bill Flood Date: Sat, 31 Aug 2024 22:12:24 -0700 Subject: [PATCH] Use constant for default medium type in Mopeka (#125002) - Updated the Mopeka BLE device setup to use const DEFAULT_MEDIUM_TYPE - Fix Spelling error in a coment --- homeassistant/components/mopeka/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/mopeka/__init__.py b/homeassistant/components/mopeka/__init__.py index 17a87efd6e6..d73ece581d7 100644 --- a/homeassistant/components/mopeka/__init__.py +++ b/homeassistant/components/mopeka/__init__.py @@ -14,7 +14,7 @@ from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from .const import CONF_MEDIUM_TYPE +from .const import CONF_MEDIUM_TYPE, DEFAULT_MEDIUM_TYPE PLATFORMS: list[Platform] = [Platform.SENSOR] @@ -29,8 +29,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: MopekaConfigEntry) -> bo address = entry.unique_id assert address is not None - # Default sensors configured prior to the intorudction of MediumType - medium_type_str = entry.data.get(CONF_MEDIUM_TYPE, MediumType.PROPANE.value) + # Default sensors configured prior to the introduction of MediumType + medium_type_str = entry.data.get(CONF_MEDIUM_TYPE, DEFAULT_MEDIUM_TYPE) data = MopekaIOTBluetoothDeviceData(MediumType(medium_type_str)) coordinator = entry.runtime_data = PassiveBluetoothProcessorCoordinator( hass,