1.3.0 - 2026-09-25
This release closes a SQL injection gap in ha_mysql.set_query, makes it
possible to change a connection's host, port, username, password and database
without removing and re-adding the integration, and gives the integration its
own icon and logo in the Home Assistant UI.
Added
- Configure → Change the database connection, to edit the host, port,
username, password and database of an existing connection from the
integration card. The new connection is tested before it replaces the old
one; the sensors are left untouched. valuesonha_mysql.set_query, to bind values to%splaceholders in the
query separately from its text. The driver quotes and escapes each value
according to its type, so a quote, a semicolon or a stray backslash in the
value can no longer change what the statement does. Templates invalues
are rendered with their native type, so a number or a boolean is bound as
such instead of as text.- Brand images shipped with the integration, in
custom_components/ha_mysql/brand/:icon.png(256x256),icon@2x.png
(512x512),logo.png(256x64) andlogo@2x.png(512x128). Home Assistant
2026.3.0 and later read these directly and give them priority over the
brands CDN, so the integration now shows its own icon and logo in the UI.
Older Home Assistant versions ignore the folder and are unaffected. scripts/build_brands.py, which generates those images from the raw
artwork. It keys out the background with a flood fill from the image
border, so dark elements inside the artwork are preserved, and typesets
the wordmark.- Releases ship a
homeassistant-ha_mysql.zipasset again, built and
attached automatically by.github/workflows/release.yamlwhen a release
is published. HACS installs from it instead of fetching every file
separately through the GitHub API, and the downloads badge counts again.
Changed
- Only a single, read-only statement is now accepted everywhere a query
enters the integration: the user interface,configuration.yamland
ha_mysql.set_query. A query with more than one statement, or one that is
notSELECT-style, is refused before it ever reaches the database.
Previously, testing a sensor query when adding or editing it would run a
write for real if the query happened to contain one. - A newly added sensor's entity ID and friendly name now include the
connection's device name, for example
sensor.mydatabase_192_168_1_10_employeesand "mydatabase @ 192.168.1.10
Employees", the same way Home Assistant names every other entity that
belongs to a device. Sensors that already existed keep the entity ID and
history they already had; this only applies to sensors added from now on.