diff --git a/homeassistant/components/esphome/__init__.py b/homeassistant/components/esphome/__init__.py index c0a3b1ed767..b7251ef761c 100644 --- a/homeassistant/components/esphome/__init__.py +++ b/homeassistant/components/esphome/__init__.py @@ -66,8 +66,12 @@ CONF_NOISE_PSK = "noise_psk" _LOGGER = logging.getLogger(__name__) _R = TypeVar("_R") -STABLE_BLE_VERSION_STR = "2022.11.0" +STABLE_BLE_VERSION_STR = "2022.12.0" STABLE_BLE_VERSION = AwesomeVersion(STABLE_BLE_VERSION_STR) +PROJECT_URLS = { + "esphome.bluetooth-proxy": "https://esphome.github.io/bluetooth-proxies/", +} +DEFAULT_URL = f"https://esphome.io/changelog/{STABLE_BLE_VERSION_STR}.html" @callback @@ -75,13 +79,13 @@ def _async_check_firmware_version( hass: HomeAssistant, device_info: EsphomeDeviceInfo ) -> None: """Create or delete an the ble_firmware_outdated issue.""" - # ESPHome device_info.name is the unique_id - issue = f"ble_firmware_outdated-{device_info.name}" + # ESPHome device_info.mac_address is the unique_id + issue = f"ble_firmware_outdated-{device_info.mac_address}" if ( not device_info.bluetooth_proxy_version # If the device has a project name its up to that project # to tell them about the firmware version update so we don't notify here - or device_info.project_name + or (device_info.project_name and device_info.project_name not in PROJECT_URLS) or AwesomeVersion(device_info.esphome_version) >= STABLE_BLE_VERSION ): async_delete_issue(hass, DOMAIN, issue) @@ -92,9 +96,12 @@ def _async_check_firmware_version( issue, is_fixable=False, severity=IssueSeverity.WARNING, - learn_more_url=f"https://esphome.io/changelog/{STABLE_BLE_VERSION_STR}.html", + learn_more_url=PROJECT_URLS.get(device_info.project_name, DEFAULT_URL), translation_key="ble_firmware_outdated", - translation_placeholders={"name": device_info.name}, + translation_placeholders={ + "name": device_info.name, + "version": STABLE_BLE_VERSION_STR, + }, ) diff --git a/homeassistant/components/esphome/strings.json b/homeassistant/components/esphome/strings.json index d28bbd1b8a6..c403de8d881 100644 --- a/homeassistant/components/esphome/strings.json +++ b/homeassistant/components/esphome/strings.json @@ -47,8 +47,8 @@ }, "issues": { "ble_firmware_outdated": { - "title": "Update {name} with ESPHome 2022.11.0 or later", - "description": "To improve Bluetooth reliability and performance, we highly recommend updating {name} with ESPHome 2022.11.0 or later." + "title": "Update {name} with ESPHome {version} or later", + "description": "To improve Bluetooth reliability and performance, we highly recommend updating {name} with ESPHome {version} or later. When updating the device to ESPHome {version}, it is recommended to use a serial cable instead of an over-the-air update to take advantage of the new partition scheme." } } } diff --git a/homeassistant/components/esphome/translations/en.json b/homeassistant/components/esphome/translations/en.json index ae0c57007e3..63fc3ed0573 100644 --- a/homeassistant/components/esphome/translations/en.json +++ b/homeassistant/components/esphome/translations/en.json @@ -47,8 +47,8 @@ }, "issues": { "ble_firmware_outdated": { - "description": "To improve Bluetooth reliability and performance, we highly recommend updating {name} with ESPHome 2022.11.0 or later.", - "title": "Update {name} with ESPHome 2022.11.0 or later" + "description": "To improve Bluetooth reliability and performance, we highly recommend updating {name} with ESPHome {version} or later. When updating the device to ESPHome {version}, it is recommended to use a serial cable instead of an over-the-air update to take advantage of the new partition scheme.", + "title": "Update {name} with ESPHome {version} or later" } } } \ No newline at end of file