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

🐛 Sensor unique IDs deduplication when using modules #113

Merged
merged 3 commits into from
Jul 3, 2023

Conversation

xaf
Copy link
Owner

@xaf xaf commented Jul 3, 2023

Some sensors like TakeoverModules and Translators will create extra sensors which share exactly the same sensor ID as the module. This makes sure that every sensor has a unique ID by adding back the zone ID after the sensor ID when the sensor is not the first one which that ID. This will ensure that we can still keep cross-installation sensors for the main sensors, but handle deduplication when using such modules.

Fixes #108

Some sensors like TakeoverModules and Translators will create extra
sensors which share exactly the same sensor ID as the module. This
makes sure that every sensor has a unique ID by adding back the zone
ID after the sensor ID when the sensor is not the first one which
that ID. This will ensure that we can still keep cross-installation
sensors for the main sensors, but handle deduplication when using
such modules.

Fixes #108
@xaf xaf force-pushed the xaf/fix_unique_id_conflict branch from 537a4d8 to fee954c Compare July 3, 2023 18:07
@xaf xaf changed the title ✨ Sensor unique IDs deduplication when using modules 🐛 Sensor unique IDs deduplication when using modules Jul 3, 2023
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Coverage

Coverage Report
FileStmtsMissCoverMissing
apps/qolsysgw
   gateway.py1683579%95–96, 131–154, 162, 187–188, 207–208, 220–221, 232–233, 242–243, 252–253, 259, 279–280
apps/qolsysgw/mqtt
   exceptions.py170100% 
   listener.py53885%42–44, 68–70, 74–75
   updater.py246797%172, 220, 223, 342, 393, 479, 556
   utils.py50100% 
apps/qolsysgw/qolsys
   actions.py50296%24, 34
   config.py701381%63–64, 66, 70, 75, 90–102, 112, 120, 146
   control.py151795%39, 47, 51, 58, 65, 81, 88
   events.py2322191%64, 69, 100, 104, 130–131, 163, 167, 190, 201, 208, 235, 251, 265, 278–280, 325, 357, 369, 414
   exceptions.py290100% 
   observable.py17382%13, 17–18
   partition.py125894%151, 156–160, 166–170, 173
   sensors.py2352291%60, 67–88, 101, 160, 218, 222, 229, 246, 250
   socket.py951980%36, 43, 52–54, 83–84, 103–105, 109–110, 114–116, 126–127, 133–134
   state.py69790%24, 67–70, 80, 88
   utils.py47491%11, 14, 20–21
TOTAL160915690% 

Tests Skipped Failures Errors Time
120 0 💤 0 ❌ 0 🔥 33.274s ⏱️

@xaf xaf merged commit e2fc40b into main Jul 3, 2023
@xaf xaf deleted the xaf/fix_unique_id_conflict branch July 3, 2023 18:55
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

Successfully merging this pull request may close these issues.

Unique_id collisions on 1.3.0 for sensors added via IQ Hardwire
1 participant