Replace assert False by raising an error (#86686)

This commit is contained in:
Franck Nijhof 2023-01-26 16:51:43 +01:00 committed by GitHub
parent adeaf746ec
commit d4955a3d87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 8 deletions

View file

@ -293,7 +293,7 @@ class ControllerDevice(ClimateEntity):
for (key, value) in self._state_to_pizone.items():
if value == mode:
return key
assert False, "Should be unreachable"
raise RuntimeError("Should be unreachable")
@property
@_return_on_connection_error([])