Retrieves a thermostat state object by its id

        :param id_: The id of the thermostat state
        :return: The thermostat state object

def get_thermostat_state_by_id(self, id_):
        """Retrieves a thermostat state object by its id

        :param id_: The id of the thermostat state
        :return: The thermostat state object
        """
        return next((state for state in self.thermostat_states
                     if state.id == id_), None)