pyg90alarm.local.cid_config

Interprets configuration data fields for CID (Contact ID) phone reporting, GETCID/SETCID commands.

Classes

G90CidConfig([phone1, phone2, user, ...])

Interprets data fields of GETCID/SETCID commands.

class pyg90alarm.local.cid_config.G90CidConfig(phone1=<pyg90alarm.dataclass.validation.StringLengthValidator object>, phone2=<pyg90alarm.dataclass.validation.StringLengthValidator object>, user=<pyg90alarm.dataclass.validation.StringLengthValidator object>, _enabled=<pyg90alarm.dataclass.validation.IntRangeValidator object>, event_flags=<pyg90alarm.dataclass.validation.StringLengthValidator object>)

Bases: DataclassLoadSave

Interprets data fields of GETCID/SETCID commands.

property enabled: bool

Returns whether CID phone reporting is enabled.

serialize()

Returns the dataclass fields as a list suitable for SETCID.

The event_flags element is always set to FFFF regardless of the current value, as expected by the panel.

Return type:

list[Any]

async classmethod load(parent, force=False)

Create an instance with values loaded from the device.

Parameters:

force (bool) – If True, bypass policy cache (if any).

Return type:

TypeVar(DataclassLoadSaveT, bound= DataclassLoadSave)

Returns:

An instance of the dataclass loaded from the device.

async classmethod load_uncached(parent)

Create an instance with values loaded from the device bypassing cache.

Return type:

TypeVar(DataclassLoadSaveT, bound= DataclassLoadSave)

async save()

Save the current data to the device.

Refreshes the load policy cache (if any): the initial load(..., force=True) repopulates the policy’s entry for this parent with the newly loaded instance used for read-modify-write.

Return type:

None