aioamazondevices 6.5.3__tar.gz → 6.5.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioamazondevices
3
- Version: 6.5.3
3
+ Version: 6.5.4
4
4
  Summary: Python library to control Amazon devices
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "aioamazondevices"
3
- version = "6.5.3"
3
+ version = "6.5.4"
4
4
  requires-python = ">=3.12"
5
5
  description = "Python library to control Amazon devices"
6
6
  authors = [
@@ -1,6 +1,6 @@
1
1
  """aioamazondevices library."""
2
2
 
3
- __version__ = "6.5.3"
3
+ __version__ = "6.5.4"
4
4
 
5
5
 
6
6
  from .api import AmazonDevice, AmazonEchoApi
@@ -56,6 +56,7 @@ from .const import (
56
56
  NOTIFICATION_MUSIC_ALARM,
57
57
  NOTIFICATION_REMINDER,
58
58
  NOTIFICATION_TIMER,
59
+ NOTIFICATIONS_SUPPORTED,
59
60
  RECURRING_PATTERNS,
60
61
  REFRESH_ACCESS_TOKEN,
61
62
  REFRESH_AUTH_COOKIES,
@@ -793,6 +794,18 @@ class AmazonEchoApi:
793
794
  for schedule in notifications["notifications"]:
794
795
  schedule_type: str = schedule["type"]
795
796
  schedule_device_serial = schedule["deviceSerialNumber"]
797
+
798
+ if schedule_device_serial in DEVICE_TO_IGNORE:
799
+ continue
800
+
801
+ if schedule_type not in NOTIFICATIONS_SUPPORTED:
802
+ _LOGGER.debug(
803
+ "Unsupported schedule type %s for device %s",
804
+ schedule_type,
805
+ schedule_device_serial,
806
+ )
807
+ continue
808
+
796
809
  if schedule_type == NOTIFICATION_MUSIC_ALARM:
797
810
  # Structure is the same as standard Alarm
798
811
  schedule_type = NOTIFICATION_ALARM
@@ -534,3 +534,9 @@ NOTIFICATION_ALARM = "Alarm"
534
534
  NOTIFICATION_MUSIC_ALARM = "MusicAlarm"
535
535
  NOTIFICATION_REMINDER = "Reminder"
536
536
  NOTIFICATION_TIMER = "Timer"
537
+ NOTIFICATIONS_SUPPORTED = [
538
+ NOTIFICATION_ALARM,
539
+ NOTIFICATION_MUSIC_ALARM,
540
+ NOTIFICATION_REMINDER,
541
+ NOTIFICATION_TIMER,
542
+ ]