Custom climate and switch components / entities

I’m the current maintainer of a Heatmiser integration over at https://github.com/MindrustUK/Heatmiser-for-home-assistant

Owing to the way the Heatmiser devices handle things such as “Hold” functionality I find my self with a Climate control component that works fine, however it’s missing functionality. As an example if you were to enable “Hold” on the thermostat it expects a time to be supplied, I’ve had a quick look and can’t see an obvious answer to the following question:

How can I add a Time input field (or arbitrary input fields) to the native Climate (and other) control(s)? I.e. I could have an input field on the Thermostat/Climate control and a switch to turn this on which would then “Hold” the temperature for the time specified in the input field. Has anyone done this, or could anyone provide pointers and examples of how I would achieve this? I can see I could add additional attributes to the control. I can also see that I could add a input_datetime component but this doesn’t seem as clean. I’m not sure if this is possible or I’m missing a trick here?

This also applies to thermostats configured in “Timeclock” mode as well as the NeoPlug switches which work in a similar fashion expecting a time to be on and off.

The answer is here for the hold time for neostat