Closed stickpin closed 9 months ago
Introduction of API Status sensors
The default status for the supported APIs is "Unknown".
The following logic applies to provide a status:
if response_code in [200, 204, 207]: status = "Up" elif response_code == 401: status = "Unauthorized" elif response_code == 403: status = "Forbidden" elif response_code == 429: status = "Rate limited" elif response_code == 1000: status = "Error" else: status = "Down"
FYI @oliverrahner
@oliverrahner I think I managed to solve all the edge cases and issues with API status detection. :) Now it's ready for merge.
Introduction of API Status sensors
The default status for the supported APIs is "Unknown".
The following logic applies to provide a status:
FYI @oliverrahner