Closed skrashevich closed 1 month ago
Great, thanks!
Are you spotting these by directly looking through the code or are you encountering some of these errors? Or is there a linting tool that is picking them up? If there's a tool perhaps I should add it to my vscode config to help avoid introducing more of these.
Anyway, thanks for the improvements, much appreciated!
Summary of changes:
In the update_advertisement function, the timestamp comparison check has been enhanced. An additional check for a non-None value before comparing with the current timestamp has been added, which prevents potential errors when handling undefined values.
In the _async_update_data function, the MAC address check has been improved. A check for a non-empty string has been added before verifying whether the first character of the address is one of 4, 5, 6, 7. This change increases the reliability of address identification and prevents possible errors in parsing unformatted data.