Shared changeset helpers for Access characteristic update actions.
Characteristics store nested value structs (units, bandwidth profiles) as flat attributes. These helpers map the nested argument shape onto those attributes.
Summary
Functions
Splits a %{downstream: d, upstream: u, units: units} bandwidth-profile
argument into three attributes.
Splits a %{amount: a, unit: u} argument into two attributes.
Functions
Splits a %{downstream: d, upstream: u, units: units} bandwidth-profile
argument into three attributes.
Returns the changeset unchanged when the argument is nil or not a map with all three keys.
Splits a %{amount: a, unit: u} argument into two attributes.
Returns the changeset unchanged when the argument is nil or not a map with both keys.