The item below, listed on Amazon, does exactly what the Heliopan hood evidently does, but at less than 1/4 the cost:
Amazon.com: Janco 58MM Diameter lens adapter tube for Panasonic DMC-FZ18, DMC-FZ28, DMC-FZ35 and DMC-FZ38 to accept 58MM Filter, Lens caps, adapters & auxiliary lens: Electronics
(or Google "Janco 58mm adapter tube Panasonic")
This is an extension tube made for a Panasonic camera (apparently) that comes in 2 parts, both well made, of black-anodized aluminum. The bottom part (which is narrower) has a thread that is smaller than 58mm and is useless as regards the 31mm lens. The top part, however, has a 58mm thread on its inner end and grooves on the inside of its outer end so that it perfectly fits the lens and accepts a standard snap-in 58mm lens cap.
If you use this top part as a hood (from which it is indistinguishable), its outer diameter is also perfect for a Kaiser 60mm push-on cap. This is what I use, but it works only because I also have a uv-filter between the hood and the lens, so that the hood projects about 8 mm beyond the built-in hood. Without the extra 5 mm provided by the filter, this would not work, but on the other hand, in that case you can still use the Pentax lens cap that comes with the lens.
All in all, a perfect solution, I think, for the otherwise perfect 31mm limited!