Coverage for custom_components/camera_autonotify/const.py: 100%

38 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-22 21:32 +0000

1"""Constants for Camera AutoNotify""" 

2 

3from typing import Final 

4 

5DOMAIN: Final[str] = "camera_autonotify" 

6SUPERNOTIFY_DOMAIN: Final[str] = "supernotify" 

7FRIGATE_DOMAIN: Final[str] = "frigate" 

8 

9# the one entry that isn't a camera, holding whether cameras found are set up without asking 

10TYPE_DISCOVERY: Final[str] = "discovery" 

11CONF_AUTO_DISCOVER: Final[str] = "auto_discover" 

12# whether Frigate zones are offered too, each with a device of its own like a camera's, but off to begin with, since 

13# a zone is part of a camera's view and so mostly covered by the camera's own notifications 

14CONF_DISCOVER_ZONES: Final[str] = "discover_zones" 

15 

16# what each entry notifies for, a camera, or a zone, which may be in the view of more than one camera 

17TYPE_CAMERA: Final[str] = "camera" 

18TYPE_ZONE: Final[str] = "zone" 

19# the integration a camera comes from, its own entry for the server or system, and the camera's or zone's name 

20# as that integration gives it 

21CONF_SOURCE: Final[str] = "source" 

22SOURCE_FRIGATE: Final[str] = "frigate" 

23CONF_SOURCE_ENTRY_ID: Final[str] = "source_entry_id" 

24CONF_SOURCE_NAME: Final[str] = "source_name" 

25 

26# the filters and timing of a camera or zone, named as the tracker's settings 

27CONF_SEVERITIES: Final[str] = "severities" 

28CONF_LABELS: Final[str] = "labels" 

29CONF_ZONES: Final[str] = "zones" 

30CONF_ZONE_MULTI: Final[str] = "zone_multi" 

31CONF_ZONE_ORDER: Final[str] = "zone_order" 

32CONF_COOLDOWN: Final[str] = "cooldown" 

33CONF_INITIAL_DELAY: Final[str] = "initial_delay" 

34CONF_FINAL_UPDATE: Final[str] = "final_update" 

35CONF_FINAL_DELAY: Final[str] = "final_delay" 

36CONF_TIMEOUT: Final[str] = "timeout" 

37CONF_ALERT_ONCE: Final[str] = "alert_once" 

38CONF_UPDATE_SUB_LABEL: Final[str] = "update_sub_label" 

39SEVERITIES: Final[tuple[str, ...]] = ("alert", "detection") 

40 

41# as the `target` and `custom_target` of supernotify.notify 

42CONF_TARGET: Final[str] = "target" 

43CONF_CUSTOM_TARGET: Final[str] = "custom_target" 

44CONF_DELIVERIES: Final[str] = "deliveries" 

45# notify entities, used only without Supernotify 

46CONF_TARGETS: Final[str] = "targets" 

47 

48# English only for the MVP 

49DISCOVERY_TITLE: Final[str] = "Automatic discovery" 

50SUPERNOTIFY_PRESENT: Final[str] = ( 

51 "Supernotify is installed, so notifications will have the snapshot, links to the clip, and every delivery it has." 

52) 

53SUPERNOTIFY_MISSING: Final[str] = ( 

54 "**Supernotify is not installed.** Only a plain text notification can be sent, to every phone with the Home " 

55 "Assistant app, with no snapshot or links. Install Supernotify from HACS for the full experience." 

56) 

57# what a notification says, the title being the camera's or zone's name 

58MESSAGE_SEEN: Final[str] = "{label} detected" 

59MESSAGE_IN_ZONES: Final[str] = "{label} detected in {zones}" 

60MESSAGE_ON_CAMERA: Final[str] = "{label} detected on {camera}" 

61MESSAGE_ENDED: Final[str] = "{message}, now ended" 

62ACTION_VIEW_SNAPSHOT: Final[str] = "View snapshot"