While this is working a maybe better approach is to just install mysqlclient
, a Python 3 compatible mysql-python
fork. Because (as I understand) this package uses c-extensions and is thus theoretically faster then the pure python pymsql
package.
TL:DR: Run in your hass virtual environment:
pip install mysqlclient
and leave your config at
db_url: 'mysql://user:psw@localhost/hass'