fix: incorrect SensorDeviceClass on Powerwall reserve setting#1164
fix: incorrect SensorDeviceClass on Powerwall reserve setting#1164alandtse merged 2 commits intoalandtse:devfrom
Conversation
Backup reserve was reported as a Battery which is isn't as it's a reserve. This was causing it to show the reserve setting as the battery charge.
Test not needed due to backup reserve setting not being a battery state, and therefore not needing a SensorDeviceClass
WalkthroughRemoved the battery device class attribute from the TeslaEnergyBackupReserve sensor and its corresponding test assertion. The sensor now has no explicitly set device class, affecting its semantic categorization without changing other properties or behavior. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
The Backup Reserve is incorrectly assigned a SensorDeviceClass of Battery. This results in home assistant thinking the battery charge level is instead the reserve setting:


Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.