Skip to content

Read only sessions and no more YAML

Choose a tag to compare

@IAsDoubleYou IAsDoubleYou released this 23 Oct 12:17
· 27 commits to main since this release

Every connection is now opened read only, the YAML configuration is gone, and a value passed to set_query is exactly what reaches the database. This is a major release because the last two change behaviour. A connection and its sensors set up through the user interface, or imported from YAML by an earlier release, keep working with the same entity IDs and history.

Requires Home Assistant 2026.3.0 or newer.

Before you update

  • Remove the YAML. The ha_mysql: section and the sensors with platform: ha_mysql in configuration.yaml are no longer read. Home Assistant reports them for as long as they are there. Remove them; nothing is lost.
  • Check your sensors under Configure. The stored sensors are the ones imported the last time Home Assistant started with an earlier release. A change made in configuration.yaml after that is not in them.
  • A YAML configuration that was never imported is not picked up. Add the connection and its sensors through the user interface.
  • There is no way back without a backup. Config entries move to version 2, and Home Assistant refuses to load them with 1.7.0 or older.

Changed

  • Every database session is opened read only. The driver runs SET SESSION TRANSACTION READ ONLY after each login: for the pool, for the connection made again after the server dropped an idle one, and for the check made while setting up. Tested against MariaDB 10.11: an INSERT, an UPDATE, a DELETE and a temporary table are refused with error 1792, a SELECT works. It sits behind the check on the query text, which still refuses anything but a single reading statement, SET included, so a query cannot lift it. A user with only SELECT rights keeps working. The rights of the database user remain the real boundary: a SELECT can still write a file through INTO OUTFILE if the user has the FILE privilege.
  • set_query binds values exactly as given. Home Assistant already renders the templates of an automation or a script before an action runs, and the integration used to render the result a second time. A value that still reads {{ ... }} when it arrives, as it can through the REST API, is now bound as that text. Automations and scripts are not affected.

Removed

  • The YAML configuration, deprecated in 1.7.0.
  • The Repairs issue 1.7.0 raised for it, on the first start.
  • The source marker the YAML import left on sensors, which the migration to version 2 drops.

Full details: CHANGELOG