Unfortunately value_for_platform_family is recipe DSL and doesn't work in attribute files.
I used this pattern as it's what I see in other repos.