* fix yamaha remove info logging
* ruff
* fix yamnaha supress rxv.find UnicodeDecodeError
* fix formatting
* make more realistic
* make more realistic and use parms
* add value error after more feedback
* ruff format
* Update homeassistant/components/yamaha/media_player.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* remove unused method
* add more debugging
* Increase discovery timeout add more debug allow config to overrite dicovery for name
---------
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Drop violating rows before adding foreign constraints
* Don't delete rows with null-references
* Only delete rows when integrityerror is caught
* Move restore of dropped foreign key constraints to a separate migration step
* Use aliases for tables
* Update homeassistant/components/recorder/migration.py
* Update test
* Don't use alias for table we're deleting from, improve test
* Fix MySQL
* Update instead of deleting in case of self references
* Improve log messages
* Batch updates
* Add workaround for unsupported LIMIT in PostgreSQL
* Simplify
---------
Co-authored-by: J. Nick Koston <nick@koston.org>
* Handle case of sensors removed server side
* Update available state on value update
* Set uptime to None if key is missing
* Replace _attr_available by _data_valid
dsmr: also migrate entries for devices with correct serial
When the dsmr code could not find the serial_nr for the gas meter,
it creates the gas meter device with the entry_id as identifier.
But when there is a correct serial_nr, it will use that as identifier
for the dsmr gas device.
Now the migration code did not take this into account, so migration to
the new name failed since it didn't look for the device with correct
serial_nr.
This commit fixes this and adds a test for this.
* Ensure legacy event foreign key is removed from the states table
If the system ran out of disk space removing the FK, it would
fail. #121938 fixed that to try again, however that PR was made
ineffective by #122069 since it will never reach the check.
To solve this, the migration version is incremented to 2, and
the migration is no longer marked as done unless the rebuild
/fk removal is successful.
* fix logic for mysql
* fix test
* asserts
* coverage
* coverage
* narrow test
* fixes
* split tests
* should have skipped
* fixture must be used