It would not work that way. Each device is going to limit the current (or voltage, depending upon how it works) that whatever is plugged into it receives.

If used together, the dimmer will be limiting the amount of electricity that the thermostat gets, and that is not what you want.