Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect handling of partition id #39

Open
simie7 opened this issue Jan 1, 2025 · 0 comments
Open

Incorrect handling of partition id #39

simie7 opened this issue Jan 1, 2025 · 0 comments

Comments

@simie7
Copy link

simie7 commented Jan 1, 2025

I cannot change the status of one of the partitions on HA.
ELDES supports 4 partitions (if I remember correctly). If I define first and last partition (skipping second and third), JSON will return it as first and second, but internalId will be 0 and 3.

Function get_device_partitions gets correct json:

2025-01-01 22:26:23.147 DEBUG (MainThread) [custom_components.eldes_alarm.core.eldes_cloud] get_device_partitions result: [{'internalId': 0, 'name': 'PartName', 'photoId': None, 'iconName': None, 'armed': False, 'armStay': False, 'state': 'disarmed', 'hasUnacceptedPartitionAlarms': True}, {'internalId': 3, 'name': 'AnotherPartName', 'photoId': None, 'iconName': None, 'armed': True, 'armStay': False, 'state': 'armed_away', 'hasUnacceptedPartitionAlarms': True}]

But then somewhere in the code incorrectly sets partitionIndex. As a consequence, 'internalId': 3 becomes 'partitionIndex': 1 and partition management is not working:

2025-01-01 22:30:47.050 DEBUG (MainThread) [custom_components.eldes_alarm.core.eldes_cloud] data result: {'imei': 'XXXXXXXXXXXXXXXX', 'pin': 'XXXX', 'partitionIndex': 1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant