Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sleepiq single sleeper crash (#24941)
* Update sleepyq to 0.7 Fixes crash when working with a single sleeper. * sleepiq: Handle null side definitions These happen if no sleeper is defined for a side of the bed. Don't create sensors for null sides; they'll crash every time we try to use them. * sleepiq: Fix urls mocked to match sleepyq 0.7 * sleepi: Fix test_sensor.TestSleepIQSensorSetup Sleepyq 0.7 throws on empty strings, so we have to specify them. * sleepiq: Test for ValueError thrown by sleepyq 0.7 * sleepiq: Drop no longer used HTTPError import * sleepiq: Add tests for single sleeper case * sleepiq: Shorten comments to not overflow line length * sleepiq: Use formatted string literals for adding suffixes to test files * sleepiq: Use str.format() for test suffixing
- Loading branch information
Showing
11 changed files
with
103 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"beds" : [ | ||
{ | ||
"dualSleep" : false, | ||
"base" : "FlexFit", | ||
"sku" : "AILE", | ||
"model" : "ILE", | ||
"size" : "KING", | ||
"isKidsBed" : false, | ||
"sleeperRightId" : "-80", | ||
"accountId" : "-32", | ||
"bedId" : "-31", | ||
"registrationDate" : "2016-07-22T14:00:58Z", | ||
"serial" : null, | ||
"reference" : "95000794555-1", | ||
"macAddress" : "CD13A384BA51", | ||
"version" : null, | ||
"purchaseDate" : "2016-06-22T00:00:00Z", | ||
"sleeperLeftId" : "0", | ||
"zipcode" : "12345", | ||
"returnRequestStatus" : 0, | ||
"name" : "ILE", | ||
"status" : 1, | ||
"timezone" : "US/Eastern" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"beds" : [ | ||
{ | ||
"bedId" : "-31", | ||
"rightSide" : { | ||
"alertId" : 0, | ||
"lastLink" : "00:00:00", | ||
"isInBed" : true, | ||
"sleepNumber" : 40, | ||
"alertDetailedMessage" : "No Alert", | ||
"pressure" : -16 | ||
}, | ||
"status" : 1, | ||
"leftSide" : null | ||
} | ||
] | ||
} |