Skip to content

PowerNetbox v4.6.0.3

Released 2026-05-16 - View on GitHub

Bug fix

Device.position typed as [uint16] lost precision on fractional rack positions (#412) — reported by @mkarel

NetBox stores rack position as a float so half-U devices can sit at 1.5U, 2.5U, etc. PowerNetbox typed the Position parameter as [uint16], silently truncating 1.5 to 1 on input and round-trip.

  • New-NBDCIMDevice / Get-NBDCIMDevice: Position is now [double] with [ValidateRange(0.5, 999.99)].
  • Set-NBDCIMDevice: Position is now [Nullable[double]]. No [ValidateRange] — it fires before [Nullable[T]] binding, so -Position $null (unrack the device) would otherwise throw ValidationMetadataException (same pattern as #398). Server-side validation enforces the bound; -Position $null correctly clears the field.

Fractional positions now round-trip correctly. Existing integer-position callers are unaffected (1 still binds as 1.0).

8 new unit tests (fractional preserve, integer-as-double, sub-0.5 rejection on New/Get, null-clear on Set, parameter-type assertions).

Co-Authored-By: Matt Karel mkarel@gmail.com

Full Changelog: https://github.com/ctrl-alt-automate/PowerNetbox/compare/v4.6.0.2...v4.6.0.3