feat: add LAFVIN UPS Module 3S sensor plugin (lafvin_ups_3s)#261
Merged
Conversation
pyMC_Repeater 1.0.10 updates
Adds a new sensor type for the LAFVIN UPS Module 3S, an INA219-based uninterruptible power supply for Raspberry Pi. Reports pack voltage, current, power, estimated state-of-charge, and charge state for a 3S Li-ion/LiPo battery configuration (9.0–12.6 V range). The INA219 address defaults to 0x41 (as wired on the LAFVIN board) and shunt resistance is configurable for accurate current readings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
lafvin_ups_3ssensor type for the LAFVIN UPS Module 3S — an INA219-based UPS HAT for Raspberry Pi with a 3S Li-ion/LiPo battery packcharging/discharging/idle)waveshare_ups_d0x41(as factory-wired on the LAFVIN board); shunt resistance and max current are configurable for accurate calibrationSensorManagerimport mechanism — no changes to__init__.pyor registry requiredConfig example
Test plan
i2cdetect -y 1shows device at0x41with LAFVIN UPS connectedLAFVIN UPS 3S INA219 initialized)charging,discharging, andidle🤖 Generated with Claude Code