Remove state from (most) action callbacks #5

Open
opened 2025-09-08 02:12:39 +00:00 by Dreaded_X · 0 comments
Owner

For most action callbacks the data reported in the state parameter should also be accessible though the device itself, e.g. on(). Instead of having all of this duplicate data we should just access it though the device.

One exception might be the battery state as that is not something we (currently) store and probably won't store either.

One potential issue though would maybe be the data changing during the callback? Not sure if that would really lead to issues though.

For most action callbacks the data reported in the state parameter should also be accessible though the device itself, e.g. on(). Instead of having all of this duplicate data we should just access it though the device. One exception might be the battery state as that is not something we (currently) store and probably won't store either. One potential issue though would maybe be the data changing during the callback? Not sure if that would really lead to issues though.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Dreaded_X/automation_rs#5