DRV-42: copier update to template v0.7.0 (fix BOOL variable format)#61
Merged
svc-finitelabs[bot] merged 2 commits intoMay 22, 2026
Merged
Conversation
Pulls in template v0.6.0 fix for src/lib/values.lua: BOOL variables now serialize to '0'/'1' instead of 'true'/'false', matching what C4 expects. This restores BOOL state visibility in the Variables Agent for binary_sensor and switch entities (GitHub issue #55). v0.6.0 also reorganizes update() to leave the OVC callback alone on inbound state pushes (split into setCallback), so a state arriving while a callback is registered no longer clears it. Existing callsites in this driver (binary_sensor, switch, etc.) remain source-compatible. v0.7.0 adds the answers-file template so future copier updates persist _commit and any new answers. Closes GH-55.
Variables Agent users will see this go from showing False permanently to reflecting actual state, which is worth a user-facing changelog note.
derek-miller
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes DRV-42 / closes #55.
Summary
`copier update` from template v0.5.0 → v0.7.0. The only material change in driver behavior comes from template v0.6.0: BOOL variables now serialize as `"0"`/`"1"` instead of `"true"`/`"false"`, which is what Control4 actually expects. Without this, BOOL variables created by the driver (the ` State` variable for `binary_sensor` and `switch`, plus all BTHome BOOL sensors) showed `False` permanently in the Variables Agent even though the value was changing under the hood.
Template v0.7.0 is a one-line copier housekeeping change (adds the answers-file template so future `copier update` runs persist `_commit` and any new answers).
What changed in the driver
Only two files:
Why this is safe
Verification
Out of scope (follow-up)
The same template fix needs to roll into `control4-mqtt`, `control4-home-connect`, and `control4-finite-labs-essentials` (all pinned at v0.5.0). I'll handle those as separate per-repo `copier update` PRs after this one is signed off — touching one driver at a time keeps the blast radius small if anything regresses.