diff --git a/custom_components/fuel_prices/sensor.py b/custom_components/fuel_prices/sensor.py index 98d6781..9e7c092 100644 --- a/custom_components/fuel_prices/sensor.py +++ b/custom_components/fuel_prices/sensor.py @@ -51,7 +51,7 @@ async def async_setup_entry( ) ) found_entities.append(station["id"]) - if area[CONF_CHEAPEST_SENSORS]: + if area.get(CONF_CHEAPEST_SENSORS, False): _LOGGER.debug("Registering %s cheapest entities for area %s", area[CONF_CHEAPEST_SENSORS_COUNT], area[CONF_NAME])