Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Add some tests for HomeKit Koogeek LS1 #22141
This is purely a test addition. In my configentry branch for homekit_controller I have a bunch of tests that actually make up the bulk of the remaining changes (as they ship with json), so i'm adding them seperately up front where possible so that the config entry stuff will be easier to review.
This is an example one, I have some similar ones lined up. I have taken a dump of the characteristic data for a Koogeek LS1 (my own) as JSON. This is in the same format that the device returns it. I can load that into my test harness to create a testing fake that supports the same features as a real Koogeek LS1. For example, I can assert that the LS1 doesn't support colour temperature (at least with my firmware revision). This means I can pin down if something changes the supported_features for an entity unexpectedly, and that nothing breaks the entity id, unique id or friendly name of a device by accident.
When the configentry stuff lands i'll also make some assertions about the device registry entries too.
I've also added some tests around known homekit_controller failure modes that the Koogeek LS1 did have.
If this sort of test is acceptable I have similar ones lined up for Ecobee 3, Aqara Gateway and Lennox E30.