mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
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
This commit is contained in:
parent
30772da0e1
commit
95a25c72dc
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user