numeric() ->minValue(0) ->step(0.01) ->suffix('€') ->formatStateUsing(fn (?int $state): ?string => $state === null ? null : number_format($state / 100, 2, '.', '')) ->dehydrateStateUsing(fn (string|int|float|null $state): ?int => $state === null || $state === '' ? null : (int) round((float) $state * 100)); } }